Enforce "Basic" UI when using --info switch

Blinkenlights does not work well (at all) when using the --info
switch. All we really want here is an output that can be pasted as
debugging information.

Enforce the usage of the "Basic" ui, when the --info switch is used.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-01-20 14:53:18 +01:00
parent 47390e03d6
commit 58450fb22e
2 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ Changes
* Slight performance enhancement uploading mails to an IMAP server in the
common case.
* Enforce basic UI when using the --info switch
Bug Fixes
---------

View File

@ -200,6 +200,7 @@ class OfflineImap:
# TODO, make use of chosen ui for logging
logging.warning('Using old interface name, consider using one '
'of %s' % ', '.join(UI_LIST.keys()))
if options.diagnostics: ui_type = 'basic' # enforce basic UI for --info
try:
# create the ui class
self.ui = UI_LIST[ui_type.lower()](config)