Fixed some silly errors from refactor in last commit

This commit is contained in:
Anna 2010-06-29 11:05:17 -04:00
parent 9857187635
commit 14741c0fd0

View File

@ -650,7 +650,7 @@ class Hrafn():
### end class Hrafn ### end class Hrafn
def _check_config(self, config, config_file): def _check_config(config, config_file):
new_data = False new_data = False
if not config.has_section('global'): if not config.has_section('global'):
config.add_section('global') config.add_section('global')
@ -688,12 +688,13 @@ if __name__ == "__main__":
parser.add_option('-n' ,'--no-resize', dest="resize", action='store_false', default=True, help="use the default window size instead of the size from the last session") parser.add_option('-n' ,'--no-resize', dest="resize", action='store_false', default=True, help="use the default window size instead of the size from the last session")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
# Read in config, and set config options to defaults,
# if they are not present
config = ConfigParser.ConfigParser() config = ConfigParser.ConfigParser()
config.read(os.path.expanduser(options.filename)) config.read(os.path.expanduser(options.filename))
_check_config(config, options.filename)
# Set config options to defaults, if they are not present # Set the convenient global debug flag
_check_config(config, config_file)
debug = False debug = False
if config.get('global', 'debug') == 1: if config.get('global', 'debug') == 1:
debug = True debug = True