diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-06-05 13:42:43 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-06-05 13:42:43 +0000 |
| commit | 09adc96f8fdf923a2aa377f408b956cb8fba3097 (patch) | |
| tree | 8d52eb4a83242286bef1cc73cd06f1bace8b0490 /nova/scheduler | |
| parent | 17cbb833aba3bedab8eb80ed89a76bdd52a94ce7 (diff) | |
| parent | bf68a9592db4c90bc9421ce49c7c0766966d6e7e (diff) | |
| download | nova-09adc96f8fdf923a2aa377f408b956cb8fba3097.tar.gz nova-09adc96f8fdf923a2aa377f408b956cb8fba3097.tar.xz nova-09adc96f8fdf923a2aa377f408b956cb8fba3097.zip | |
Merge "Improve Python 3.x compatibility"
Diffstat (limited to 'nova/scheduler')
| -rw-r--r-- | nova/scheduler/scheduler_options.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/scheduler/scheduler_options.py b/nova/scheduler/scheduler_options.py index f7aa91155..bae470d1b 100644 --- a/nova/scheduler/scheduler_options.py +++ b/nova/scheduler/scheduler_options.py @@ -66,7 +66,7 @@ class SchedulerOptions(object): """Get the last modified datetime. Broken out for testing.""" try: return os.path.getmtime(filename) - except os.error, e: + except os.error as e: with excutils.save_and_reraise_exception(): LOG.exception(_("Could not stat scheduler options file " "%(filename)s: '%(e)s'"), locals()) @@ -75,7 +75,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: " "'%(e)s'") % locals()) return {} |
