Use Python 3.x compatible except construct

Python 3.x deprecated excecpt x,y. Use except x as y,
which works with any Python version >= 2.6

Change-Id: I264049ee41e75bcedea86adf7c2011c343f47ddb
This commit is contained in:
Dirk Mueller 2013-06-12 22:55:03 +02:00
parent 580c554c19
commit 9db6e14a45
4 changed files with 4 additions and 4 deletions

View File

@ -61,5 +61,5 @@ if __name__ == '__main__':
server = wsgi.Server()
server.start(app, cfg.CONF, default_port=port)
server.wait()
except RuntimeError, e:
except RuntimeError as e:
sys.exit("ERROR: %s" % e)

View File

@ -63,5 +63,5 @@ if __name__ == '__main__':
server = wsgi.Server()
server.start(app, cfg.CONF, default_port=port)
server.wait()
except RuntimeError, e:
except RuntimeError as e:
sys.exit("ERROR: %s" % e)

View File

@ -682,7 +682,7 @@ Commands:
sys.exit(result)
except (RuntimeError,
NotImplementedError,
exception.ClientConfigurationError), ex:
exception.ClientConfigurationError) as ex:
oparser.print_usage()
logging.error("ERROR: %s" % ex)
sys.exit(1)

View File

@ -270,7 +270,7 @@ Commands:
sys.exit(result)
except (RuntimeError,
NotImplementedError,
exception.ClientConfigurationError), ex:
exception.ClientConfigurationError) as ex:
oparser.print_usage()
logging.error("ERROR: %s" % ex)
sys.exit(1)