Merge lp:~cjwatson/storm/py3-reraise-fix into lp:storm

Proposed by Colin Watson on 2019-08-11
Status: Merged
Merged at revision: 515
Proposed branch: lp:~cjwatson/storm/py3-reraise-fix
Merge into: lp:storm
Diff against target: 14 lines (+3/-2)
1 file modified
storm/schema/patch.py (+3/-2)
To merge this branch: bzr merge lp:~cjwatson/storm/py3-reraise-fix
Reviewer Review Type Date Requested Status
Kristian Glass (community) Approve on 2019-08-12
Storm Developers 2019-08-11 Pending
Review via email: mp+371162@code.launchpad.net

Commit message

Fix mistake in conversion to six.reraise.

Description of the change

The second argument to six.reraise needs to be an actual exception instance, not merely the arguments to its constructor. (The latter works in Python 2, but not in Python 3.)

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'storm/schema/patch.py'
2--- storm/schema/patch.py 2019-08-09 13:11:30 +0000
3+++ storm/schema/patch.py 2019-08-11 10:11:07 +0000
4@@ -124,8 +124,9 @@
5 patch_repr = getattr(module, "__file__", version)
6 six.reraise(
7 BadPatchError,
8- "Patch %s failed: %s: %s" %
9- (patch_repr, type.__name__, str(value)),
10+ BadPatchError(
11+ "Patch %s failed: %s: %s" %
12+ (patch_repr, type.__name__, str(value))),
13 traceback)
14 self._committer.commit()
15

Subscribers

People subscribed via source and target branches

to status/vote changes: