Mercurial > p > roundup > code
comparison roundup/configuration.py @ 2839:f965de0c1e75
fix load_ini: configuration file name was ignored after all
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Fri, 29 Oct 2004 20:34:36 +0000 |
| parents | cdf6787ffeda |
| children | 5dddfc64816d |
comparison
equal
deleted
inserted
replaced
| 2838:91b2d50f0b1a | 2839:f965de0c1e75 |
|---|---|
| 1 # Roundup Issue Tracker configuration support | 1 # Roundup Issue Tracker configuration support |
| 2 # | 2 # |
| 3 # $Id: configuration.py,v 1.17 2004-10-17 17:35:32 a1s Exp $ | 3 # $Id: configuration.py,v 1.18 2004-10-29 20:34:36 a1s Exp $ |
| 4 # | 4 # |
| 5 __docformat__ = "restructuredtext" | 5 __docformat__ = "restructuredtext" |
| 6 | 6 |
| 7 import getopt | 7 import getopt |
| 8 import imp | 8 import imp |
| 844 # parse the file | 844 # parse the file |
| 845 config_defaults = {"HOME": home_dir} | 845 config_defaults = {"HOME": home_dir} |
| 846 if defaults: | 846 if defaults: |
| 847 config_defaults.update(defaults) | 847 config_defaults.update(defaults) |
| 848 config = ConfigParser.ConfigParser(config_defaults) | 848 config = ConfigParser.ConfigParser(config_defaults) |
| 849 config.read([os.path.join(home_dir, self.INI_FILE)]) | 849 config.read([config_path]) |
| 850 # .ini file loaded ok. | 850 # .ini file loaded ok. |
| 851 self.HOME = home_dir | 851 self.HOME = home_dir |
| 852 self.filepath = config_path | 852 self.filepath = config_path |
| 853 self._adjust_options(config) | 853 self._adjust_options(config) |
| 854 # set the options, starting from HOME | 854 # set the options, starting from HOME |
