comparison roundup/configuration.py @ 2622:5a27c34e99ef

er... straighten the logic. "if not" with "else" branch is one of the ugliest programming constructs! sorry.
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Sun, 25 Jul 2004 13:21:38 +0000
parents 92c820cfcc4a
children 4e1030d49cea
comparison
equal deleted inserted replaced
2621:d344419d599d 2622:5a27c34e99ef
1 # Roundup Issue Tracker configuration support 1 # Roundup Issue Tracker configuration support
2 # 2 #
3 # $Id: configuration.py,v 1.3 2004-07-25 13:12:59 a1s Exp $ 3 # $Id: configuration.py,v 1.4 2004-07-25 13:21:38 a1s Exp $
4 # 4 #
5 __docformat__ = "restructuredtext" 5 __docformat__ = "restructuredtext"
6 6
7 import imp 7 import imp
8 import os 8 import os
509 _class = _option_def[0] 509 _class = _option_def[0]
510 _args = _option_def[1:] 510 _args = _option_def[1:]
511 _option = _class(self, _section, *_args) 511 _option = _class(self, _section, *_args)
512 self.add_option(_option) 512 self.add_option(_option)
513 # load the config if tracker_home given 513 # load the config if tracker_home given
514 if tracker_home is not None: 514 if tracker_home is None:
515 self.init_logging()
516 else:
515 self.load(tracker_home) 517 self.load(tracker_home)
516 else:
517 self.init_logging()
518 518
519 def add_option(self, option): 519 def add_option(self, option):
520 """Adopt a new Option object""" 520 """Adopt a new Option object"""
521 _section = option.section 521 _section = option.section
522 _name = option.setting 522 _name = option.setting

Roundup Issue Tracker: http://roundup-tracker.org/