Mercurial > p > roundup > code
comparison roundup/configuration.py @ 4342:94c992852f12
add in-memory hyperdb implementation to speed up testing
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 02 Feb 2010 04:44:18 +0000 |
| parents | 9225a37fbeae |
| children | 863ec554525c |
comparison
equal
deleted
inserted
replaced
| 4341:7f67092fe03d | 4342:94c992852f12 |
|---|---|
| 1247 Config.__init__(self, home_dir, layout=SETTINGS, settings=settings) | 1247 Config.__init__(self, home_dir, layout=SETTINGS, settings=settings) |
| 1248 # load the config if home_dir given | 1248 # load the config if home_dir given |
| 1249 if home_dir is None: | 1249 if home_dir is None: |
| 1250 self.init_logging() | 1250 self.init_logging() |
| 1251 | 1251 |
| 1252 def copy(self): | |
| 1253 new = CoreConfig() | |
| 1254 new.sections = list(self.sections) | |
| 1255 new.section_descriptions = dict(self.section_descriptions) | |
| 1256 new.section_options = dict(self.section_options) | |
| 1257 new.options = dict(self.options) | |
| 1258 return new | |
| 1259 | |
| 1252 def _get_unset_options(self): | 1260 def _get_unset_options(self): |
| 1253 need_set = Config._get_unset_options(self) | 1261 need_set = Config._get_unset_options(self) |
| 1254 # remove MAIL_PASSWORD if MAIL_USER is empty | 1262 # remove MAIL_PASSWORD if MAIL_USER is empty |
| 1255 if "password" in need_set.get("mail", []): | 1263 if "password" in need_set.get("mail", []): |
| 1256 if not self["MAIL_USERNAME"]: | 1264 if not self["MAIL_USERNAME"]: |
