checkbox-certification-client cannot start on trusty:
u@u-Vostro-V131:~$ checkbox-certification-client
Traceback (most recent call last):
File "/usr/share/checkbox/run", line 33, in <module>
main()
File "/usr/share/checkbox/run", line 28, in main
application = manager.create_application(sys.argv)
File "/usr/lib/python3/dist-packages/checkbox/application.py", line 111, in create_application
set_logging(options.log_level, options.log)
File "/usr/lib/python3/dist-packages/checkbox/lib/log.py", line 75, in set_logging
logging.getLogger().setLevel(log_level)
File "/usr/lib/python3.4/logging/__init__.py", line 1227, in setLevel
self.level = _checkLevel(level)
File "/usr/lib/python3.4/logging/__init__.py", line 178, in _checkLevel
raise ValueError("Unknown level: %r" % level)
ValueError: Unknown level: 'Level INFO'
This bug is in checkbox itself. It turns out we were taking advantage of a bug in Python's logging module where getLevelName() would return the log level as an integer if passed a string. This was not documented: http:// docs.python. org/3.3/ library/ logging. html#logging. getLevelName
To fix this I think we have to create a mapping from string to log level and do the conversion ourselves. I don't see any function in logging that will convert a string into a log level for us.
e.g:
LEVELS = {'debug': logging.DEBUG,
'warning' : logging.WARNING,
'critical' : logging.CRITICAL}
'info': logging.INFO,
'error': logging.ERROR,
logging. getLogger( ).setLevel( LEVELS. get(level) )