Commit 0d4a6d0a authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Stop shell from destroying config instance

This caused warnings about preset variables
parent 77126a0e
......@@ -2,6 +2,7 @@ CHANGELOG for version 0.9
Bug Fixes:
- Stop shell from destroying the config instance
Changes:
......
......@@ -190,7 +190,7 @@ class Shell(Cmd):
else:
instance = cls(dict(cmd_parser.arguments))
cmd_parser.update_arguments(instance.arguments)
instance.arguments.pop('config')
#instance.arguments.pop('config')
cmd_parser.arguments = instance.arguments
cmd_parser.syntax = '%s %s' % (
subcmd.path.replace('_', ' '), cls.syntax)
......
......@@ -33,7 +33,7 @@
from kamaki.logger import get_logger
log = get_logger('kamaki.cli')
log = get_logger(__name__)
class _command_init(object):
......@@ -54,9 +54,8 @@ class _command_init(object):
self['config'].get('global', 'log_token') == 'on',
self['config'].get('global', 'log_data') == 'on')
except Exception as e:
log.warning('Failed to read custom log settings: %s' % e)
log.warning('\tdefaults for token and data logging are off')
pass
log.warning('Failed to read custom log settings:'
'%s\n defaults for token and data logging are off' % e)
def _update_max_threads(self):
try:
......@@ -64,10 +63,9 @@ class _command_init(object):
assert max_threads > 0
self.client.MAX_THREADS = max_threads
except Exception as e:
log.warning('Failed to read custom thread settings: %s' % e)
log.warning(
'\tdefault for max threads is %s' % self.client.MAX_THREADS)
pass
log.warning('Failed to read custom thread settings: '
'%s, use default max threads (%s)' % (
e, self.client.MAX_THREADS))
def _safe_progress_bar(self, msg, arg='progress_bar'):
"""Try to get a progress bar, but do not raise errors"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment