Use Python 3.x compatible except construct
Use except x as y:, which works with any Python version >= 2.6 Change-Id: Ibf0f9aa8fb9725c1c9c00558ec217db96301678f
This commit is contained in:
parent
317220858e
commit
646096aa11
@ -76,7 +76,7 @@ class SchedulerOptions(object):
|
|||||||
"""Decode the JSON file. Broken out for testing."""
|
"""Decode the JSON file. Broken out for testing."""
|
||||||
try:
|
try:
|
||||||
return json.load(handle)
|
return json.load(handle)
|
||||||
except ValueError, e:
|
except ValueError as e:
|
||||||
LOG.exception(_("Could not decode scheduler options: '%s'") % e)
|
LOG.exception(_("Could not decode scheduler options: '%s'") % e)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user