Adds Python 3.x compatible exception handling
Fixes exception handling syntax for Python 3.x compatibility
Changes generated with:
2to3 -f except -w -n cloudbaseinit
This commit is contained in:
@@ -47,7 +47,7 @@ def get_metadata_service():
|
||||
try:
|
||||
if service.load():
|
||||
return service
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
LOG.error("Failed to load metadata service '%s'" % class_path)
|
||||
LOG.exception(ex)
|
||||
raise Exception("No available service found")
|
||||
|
||||
Reference in New Issue
Block a user