From: Dirk Mueller Date: Wed, 12 Jun 2013 20:55:03 +0000 (+0200) Subject: Use Python 3.x compatible except construct X-Git-Tag: 2014.1~494^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9db6e14a4597b54a90b79abf7fae4af40d214433;p=openstack-build%2Fheat-build.git 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 --- diff --git a/bin/heat-api b/bin/heat-api index 0fa6f7c7..9dc6943e 100755 --- a/bin/heat-api +++ b/bin/heat-api @@ -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) diff --git a/bin/heat-api-cfn b/bin/heat-api-cfn index 48e9f9d8..db414d19 100755 --- a/bin/heat-api-cfn +++ b/bin/heat-api-cfn @@ -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) diff --git a/bin/heat-cfn b/bin/heat-cfn index 57e579e8..b26461aa 100755 --- a/bin/heat-cfn +++ b/bin/heat-cfn @@ -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) diff --git a/bin/heat-watch b/bin/heat-watch index 152b98f9..12e4264a 100755 --- a/bin/heat-watch +++ b/bin/heat-watch @@ -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)