summaryrefslogtreecommitdiff
path: root/xenserver
diff options
context:
space:
mode:
authorRussell Bryant <russell@ovn.org>2016-01-06 13:48:16 -0500
committerRussell Bryant <russell@ovn.org>2016-01-12 11:47:33 -0500
commitf3068bff92dc4fb76ee4aab149990f2492bcbc24 (patch)
tree0c85f773d245b6f60c91872f8b2db2cf9459dde9 /xenserver
parent66d61c90a79db159cc43e3f17c57d83d9a99453f (diff)
downloadopenvswitch-f3068bff92dc4fb76ee4aab149990f2492bcbc24.tar.gz
python: Fix exception handler compatibility.
Python 3 dropped exception handlers of the deprecated form: except Exception, e: You must use the newer syntax of: except Exception as e: This patch also enables a flake8 warning for this. H231 Python 3.x incompatible 'except x,y:' construct Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'xenserver')
-rwxr-xr-xxenserver/usr_share_openvswitch_scripts_ovs-xapi-sync2
1 files changed, 1 insertions, 1 deletions
diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
index f6fbe851b..bed80843c 100755
--- a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
+++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
@@ -67,7 +67,7 @@ def init_session():
try:
session = XenAPI.xapi_local()
session.xenapi.login_with_password("", "")
- except XenAPI.Failure, e:
+ except XenAPI.Failure as e:
session = None
vlog.warn("Couldn't login to XAPI (%s)" % e)
return False