From 348bd6d64be2e2241b4e375eabf432e025b174a4 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Fri, 15 Jan 2016 16:16:29 -0500 Subject: [PATCH] FIX wrong access to debug configuration value. Also adds the option to the config spec. --- pubs/config/spec.py | 3 +++ pubs/uis.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pubs/config/spec.py b/pubs/config/spec.py index 5ba4aac..c8b9e26 100644 --- a/pubs/config/spec.py +++ b/pubs/config/spec.py @@ -22,6 +22,9 @@ open_cmd = string(default=None) # "kate --block" edit_cmd = string(default='') +# If true debug mode is on which means exceptions are not catched and +# the full python stack is printed. +debug = boolean(default=False) [formating] diff --git a/pubs/uis.py b/pubs/uis.py index ed2ac98..1fe8bf0 100644 --- a/pubs/uis.py +++ b/pubs/uis.py @@ -62,7 +62,7 @@ class PrintUI(object): errors='replace') self._stderr = codecs.getwriter(self.encoding)(_get_raw_stderr(), errors='replace') - self.debug = conf.get('debug', False) + self.debug = conf['main'].get('debug', False) def message(self, *messages, **kwargs): kwargs['file'] = self._stdout