From: Dirk Mueller Date: Tue, 18 Jun 2013 19:09:19 +0000 (+0200) Subject: Use Python 3.x compatible except construct X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=646096aa111f2e1c3e180c785d15388aad4ae360;p=openstack-build%2Fcinder-build.git Use Python 3.x compatible except construct Use except x as y:, which works with any Python version >= 2.6 Change-Id: Ibf0f9aa8fb9725c1c9c00558ec217db96301678f --- diff --git a/cinder/scheduler/scheduler_options.py b/cinder/scheduler/scheduler_options.py index 2917b3977..e3b4ef510 100644 --- a/cinder/scheduler/scheduler_options.py +++ b/cinder/scheduler/scheduler_options.py @@ -76,7 +76,7 @@ class SchedulerOptions(object): """Decode the JSON file. Broken out for testing.""" try: return json.load(handle) - except ValueError, e: + except ValueError as e: LOG.exception(_("Could not decode scheduler options: '%s'") % e) return {}