summaryrefslogtreecommitdiff
path: root/virt-manager
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2017-05-05 12:47:21 -0400
committerCole Robinson <crobinso@redhat.com>2017-05-05 14:52:11 -0400
commit62feeb02a80f2d5a94773316d9193da9f53ddf3e (patch)
tree9fb382b8301d7604d82c57d12997b6e482df3947 /virt-manager
parentfcebefd3bba251ba0d5de4381f55789df2c57295 (diff)
downloadvirt-manager-62feeb02a80f2d5a94773316d9193da9f53ddf3e.tar.gz
Switch to python3 style 'except X as Y' notation
Which also works with python2.7
Diffstat (limited to 'virt-manager')
-rwxr-xr-xvirt-manager4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt-manager b/virt-manager
index b3a8f691..cf535714 100755
--- a/virt-manager
+++ b/virt-manager
@@ -85,7 +85,7 @@ def _import_gtk(leftovers):
globals()["Gtk"] = Gtk
import virtManager.config
ignore = virtManager.config
- except Exception, e:
+ except Exception as e:
# Don't just let the exception raise here. abrt reports bugs
# when users mess up su/sudo and DISPLAY isn't set. Printing
# it avoids the issue
@@ -282,7 +282,7 @@ if __name__ == "__main__":
logging.debug("Received KeyboardInterrupt. Exiting application.")
except SystemExit:
raise
- except Exception, run_e:
+ except Exception as run_e:
if "Gtk" not in globals():
raise
_show_startup_error(str(run_e), "".join(traceback.format_exc()))