Subversion Repositories SmartDukaan

Rev

Rev 3130 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3130 Rev 3241
Line 74... Line 74...
74
        else:
74
        else:
75
            raise ConfigException(401, "The config server is not properly initialized. Please try again later")
75
            raise ConfigException(401, "The config server is not properly initialized. Please try again later")
76
 
76
 
77
    def reloadProperties(self):
77
    def reloadProperties(self):
78
        self.initialized = False;
78
        self.initialized = False;
-
 
79
        temp_config_parser = ConfigParser()
79
        try:
80
        try:
80
            read_ok = self.config_parser.read([self.cfg_path])
81
            read_ok = temp_config_parser.read([self.cfg_path])
81
        except Exception, e:
82
        except Exception, e:
82
            print e;
83
            print e;
83
        
84
        
84
        #check if files have been read properly
85
        #check if files have been read properly
85
        for filename in read_ok:
86
        for filename in read_ok:
86
            if filename != self.cfg_path:
87
            if filename != self.cfg_path:
87
                raise IOError("File could not be read")
88
                raise IOError("File could not be read")
88
            else:
89
            else:
89
                self.initialized = True
-
 
90
90
                self.config_parser = temp_config_parser
-
 
91
                self.initialized = True
-
 
92