python: Fix exception handler compatibility.
[cascardo/ovs.git] / xenserver / usr_share_openvswitch_scripts_ovs-xapi-sync
index f6fbe85..bed8084 100755 (executable)
@@ -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