def find_config(self): """Chooses the config file, trying to guess whether this is a development or installed project.""" load_project_config(self.config) self.dburi = config.get("sqlobject.dburi", None) if self.dburi and self.dburi.startswith("notrans_"): self.dburi = self.dburi[8:]
def load_project_config(self): """Choose the config file. Try to guess whether this is a development or installed project. """ # check whether user specified custom settings if self.load_config: load_project_config(self.config) if config.get("i18n.locale_dir"): self.locale_dir = config.get("i18n.locale_dir") print 'Use %s as a locale directory' % self.locale_dir if config.get('i18n.domain'): self.domain = config.get("i18n.domain") print 'Use %s as a message domain' % self.domain if os.path.exists(self.locale_dir) and \ not os.path.isdir(self.locale_dir): raise ProgramError, ( '%s is not a directory' % self.locale_dir) if not os.path.exists(self.locale_dir): os.makedirs(self.locale_dir)
def load_project_config(self): """Choose the config file. Try to guess whether this is a development or installed project. """ # check whether user specified custom settings if self.load_config: load_project_config(self.config) if config.get("i18n.locale_dir"): self.locale_dir = config.get("i18n.locale_dir") print 'Use %s as a locale directory' % self.locale_dir if config.get('i18n.domain'): self.domain = config.get("i18n.domain") print 'Use %s as a message domain' % self.domain if os.path.exists(self.locale_dir) and \ not os.path.isdir(self.locale_dir): raise ProgramError, ('%s is not a directory' % self.locale_dir) if not os.path.exists(self.locale_dir): os.makedirs(self.locale_dir)