Merge "Fix python2.4 incompatibility"

This commit is contained in:
Jenkins 2012-06-18 16:33:44 +00:00 committed by Gerrit Code Review
commit 2d2f656689

View File

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