From 646096aa111f2e1c3e180c785d15388aad4ae360 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 18 Jun 2013 21:09:19 +0200 Subject: [PATCH] Use Python 3.x compatible except construct Use except x as y:, which works with any Python version >= 2.6 Change-Id: Ibf0f9aa8fb9725c1c9c00558ec217db96301678f --- cinder/scheduler/scheduler_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {} -- 2.45.2