summaryrefslogtreecommitdiff
path: root/jtlib/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'jtlib/app.py')
-rw-r--r--jtlib/app.py7
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)