_verbose = arguments['verbose'].value
_cnf = arguments['config']
+ _silent = arguments['silent'].value
+ _setup_logging(_silent, _debug, _verbose, _include)
+
if _help or is_non_API:
return None, None
if not (stdout.isatty() and _colors == 'on'):
from kamaki.cli.utils import remove_colors
remove_colors()
- _silent = arguments['silent'].value
- _setup_logging(_silent, _debug, _verbose, _include)
cloud = arguments['cloud'].value or _cnf.value.get(
'global', 'default_cloud')
def _load_spec_module(spec, arguments, module):
+ global kloger
if not spec:
return None
pkg = None
for location in cmd_spec_locations:
location += spec if location == '' else '.%s' % spec
try:
+ kloger.debug('Import %s from %s' % ([module], location))
pkg = __import__(location, fromlist=[module])
+ kloger.debug('\t...OK')
return pkg
except ImportError as ie:
+ kloger.debug('\t...Failed')
continue
if not pkg:
msg = 'Loading command group %s failed: %s' % (spec, ie)
- try:
- kloger.debug(msg)
- except AttributeError:
- print msg
- print 'HINT: use a text editor to remove all global.*_cli'
- print ' settings from the configuration file'
+ msg += '\nHINT: use a text editor to remove all global.*_cli'
+ msg += '\n\tsettings from the configuration file'
+ kloger.debug(msg)
return pkg