1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

python does not approve raise without type. raise exception added

This commit is contained in:
catborise 2018-08-08 13:59:19 +03:00
parent 5bad045835
commit 12c80c5021

View file

@ -159,7 +159,7 @@ class CompatibilityMixIn(object):
if conntype != CONN_SSH: if conntype != CONN_SSH:
self.msg("Need a tunnel to access console but can't mount " + self.msg("Need a tunnel to access console but can't mount " +
"one because it's not a SSH host") "one because it's not a SSH host")
raise raise Exception(self.msg)
try: try:
# generate a string with all placeholders to avoid TypeErrors # generate a string with all placeholders to avoid TypeErrors
# in sprintf # in sprintf
@ -175,7 +175,7 @@ class CompatibilityMixIn(object):
except Exception as e: except Exception as e:
self.msg("Fail to open tunnel : %s" % e) self.msg("Fail to open tunnel : %s" % e)
raise raise
self.msg("Tunnel openned") self.msg("Tunnel opened")
else: else:
# Direct access # Direct access
self.msg("connecting to: %s:%s" % (connhost, console_port)) self.msg("connecting to: %s:%s" % (connhost, console_port))