diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-10-21 11:11:57 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-10-21 11:11:57 +0300 |
commit | 789e5bc499ec140acb832220a5e8c0d2b5c38cf5 (patch) | |
tree | a174f53cb52b83bd32cfd52635a571f706338183 /jtlib/app.py | |
parent | 08b3960093c5fdcf8f3132f144bd1cbf14b55a10 (diff) | |
download | jt-789e5bc499ec140acb832220a5e8c0d2b5c38cf5.tar.gz |
Change name of config file sections for profiles
Diffstat (limited to 'jtlib/app.py')
-rw-r--r-- | jtlib/app.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jtlib/app.py b/jtlib/app.py index c2078b7..ad0d7a3 100644 --- a/jtlib/app.py +++ b/jtlib/app.py @@ -84,15 +84,16 @@ class JournalTool(cliapp.Application): def merge_profile(self): profile = self.settings['profile'] if profile: + section = 'profile %s' % profile cp = self.settings.as_cp() - if profile not in cp.sections(): + if section not in cp.sections(): raise cliapp.AppException('Unknown profile %s' % profile) - for key in cp.options(profile): + for key in cp.options(section): if key not in self.settings: raise cliapp.AppException( 'Profile %s uses unknown setting %s' % (profile, key)) - value = cp.get(profile, key) + value = cp.get(section, key) self.settings.set_from_raw_string( 'profile %s' % profile, key, value) |