]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use Python 3.x compatible except construct
authorDirk Mueller <dirk@dmllr.de>
Tue, 18 Jun 2013 19:09:19 +0000 (21:09 +0200)
committerDirk Mueller <dirk@dmllr.de>
Tue, 18 Jun 2013 19:09:19 +0000 (21:09 +0200)
Use except x as y:, which works with any
Python version >= 2.6

Change-Id: Ibf0f9aa8fb9725c1c9c00558ec217db96301678f

cinder/scheduler/scheduler_options.py

index 2917b39770235905a74bb7de810be4bccded3ea1..e3b4ef51011982d255a793088229c1b0099cf57c 100644 (file)
@@ -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 {}