Merge lp:~mvo/oneconf/lp941193 into lp:oneconf

Proposed by Michael Vogt
Status: Merged
Merged at revision: 241
Proposed branch: lp:~mvo/oneconf/lp941193
Merge into: lp:oneconf
Diff against target: 12 lines (+1/-1)
1 file modified
oneconf/hosts.py (+1/-1)
To merge this branch: bzr merge lp:~mvo/oneconf/lp941193
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+94833@code.launchpad.net

Description of the change

Trivial fix for the exception hanlding as except Foo, Bar: will not catch Bar, only (Foo, Bar) will

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Many thanks Michael! Sorry I couldn't get to it before ;)

Stupid error, indeed ;)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'oneconf/hosts.py'
2--- oneconf/hosts.py 2012-01-05 15:06:05 +0000
3+++ oneconf/hosts.py 2012-02-27 19:34:22 +0000
4@@ -187,7 +187,7 @@
5 try:
6 with open(os.path.join(self._host_file_dir, PENDING_UPLOAD_FILENAME), 'r') as f:
7 return json.load(f)[hostid][attribute]
8- except IOError, KeyError:
9+ except (IOError, KeyError) as e:
10 return None
11
12 def gethost_by_id(self, hostid):

Subscribers

People subscribed via source and target branches