Fixed traceback from host_test_plugin - formating issue with integer

pull/719/head
Przemek Wirkus 2014-11-17 15:45:10 +00:00
parent 0e51149ecf
commit 7e11ffd173
1 changed files with 4 additions and 4 deletions

View File

@ -78,9 +78,9 @@ class HostTestPluginBase:
try:
ret = call(cmd, shell=shell)
if ret:
self.print_plugin_error("[ret=%d] Command: %s"% (self.name, self.type, ret, ' '.join(cmd)))
except Exception, e:
self.print_plugin_error("[ret=%d] Command: %s"% (int(ret), cmd))
except Exception as e:
result = False
self.print_plugin_error("[ret=%d] Command: %s"% (self.name, self.type, ret, " ".join(cmd)))
self.print_plugin_error("%s::%s: " + str(e))
self.print_plugin_error("[ret=%d] Command: %s"% (int(ret), cmd))
self.print_plugin_error(str(e))
return result