Remove python3 incompatible exception syntax.

Change-Id: I5f0687a83362ceebf03bae4a0a5b109aad7e5200
This commit is contained in:
Monty Taylor 2013-06-30 23:30:27 -04:00
parent d50b575064
commit 108f78d989

View File

@ -236,7 +236,7 @@ class CreateServer(show.ShowOne):
dst, src = f.split('=', 1)
try:
files[dst] = open(src)
except IOError, e:
except IOError as e:
raise exceptions.CommandError("Can't open '%s': %s" % (src, e))
if parsed_args.min > parsed_args.max:
@ -251,7 +251,7 @@ class CreateServer(show.ShowOne):
if parsed_args.user_data:
try:
userdata = open(parsed_args.user_data)
except IOError, e:
except IOError as e:
raise exceptions.CommandError("Can't open '%s': %s" %
(parsed_args.user_data, e))