Subversion Repositories SmartDukaan

Rev

Rev 94 | Rev 3130 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 2926
Line 71... Line 71...
71
                self.config_parser.set(self.section_name, propertyName, propertyValue)
71
                self.config_parser.set(self.section_name, propertyName, propertyValue)
72
            except NoSectionError:
72
            except NoSectionError:
73
                raise ConfigException(402, "config file is missing section 'Config'")
73
                raise ConfigException(402, "config file is missing section 'Config'")
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
 
-
 
77
    def reloadProperties(self):
-
 
78
        self.initialized = False;
-
 
79
        try:
-
 
80
            read_ok = self.config_parser.read([self.cfg_path])
-
 
81
        except Exception, e:
-
 
82
            print e;
-
 
83
        
-
 
84
        #check if files have been read properly
-
 
85
        for filename in read_ok:
-
 
86
            if filename != self.cfg_path:
-
 
87
                raise IOError("File could not be read")
-
 
88
            else:
-
 
89
                self.initialized = True
76
90