Fixed some silly errors from refactor in last commit
This commit is contained in:
parent
9857187635
commit
14741c0fd0
9
hrafn.py
9
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
|
||||
|
|
Reference in New Issue
Block a user