]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix python2.4 incompatibility
authorPiotr Siwczak <psiwczak@internap.com>
Tue, 12 Jun 2012 20:57:08 +0000 (13:57 -0700)
committerPiotr Siwczak <psiwczak@internap.com>
Tue, 12 Jun 2012 20:58:26 +0000 (13:58 -0700)
python2.4 compatibility is needed for the agent
to work on Xen

Change-Id: Ifa81a5ddb4f2a9dcb6ce94fa0d941ba6e6c2e038

quantum/plugins/openvswitch/agent/ovs_quantum_agent.py

index ee9a16480137e233f73f545dcd4faefadc399b86..1910c82756681acc52cd84bd70a78ec94092f576 100755 (executable)
@@ -133,7 +133,7 @@ class OVSQuantumAgent(object):
             all_bindings = {}
             try:
                 ports = db.ports.all()
-            except Exception as e:
+            except Exception, e:
                 LOG.info("Unable to get port bindings! Exception: %s" % e)
                 db_connected = False
                 continue
@@ -144,7 +144,7 @@ class OVSQuantumAgent(object):
             vlan_bindings = {}
             try:
                 vlan_binds = db.vlan_bindings.all()
-            except Exception as e:
+            except Exception, e:
                 LOG.info("Unable to get vlan bindings! Exception: %s" % e)
                 db_connected = False
                 continue
@@ -203,7 +203,7 @@ class OVSQuantumAgent(object):
             old_local_bindings = new_local_bindings
             try:
                 db.commit()
-            except Exception as e:
+            except Exception, e:
                 LOG.info("Unable to commit to database! Exception: %s" % e)
                 db.rollback()
                 old_local_bindings = {}