diff --git a/hrafn.py b/hrafn.py index 55cb176..fe1eb3f 100755 --- a/hrafn.py +++ b/hrafn.py @@ -650,7 +650,7 @@ class Hrafn(): ### end class Hrafn -def _check_config(self, config, config_file): +def _check_config(config, config_file): new_data = False if not config.has_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") (options, args) = parser.parse_args() + # Read in config, and set config options to defaults, + # if they are not present config = ConfigParser.ConfigParser() config.read(os.path.expanduser(options.filename)) + _check_config(config, options.filename) - # Set config options to defaults, if they are not present - _check_config(config, config_file) - + # Set the convenient global debug flag debug = False if config.get('global', 'debug') == 1: debug = True