Merge lp:~cjwatson/storm/no-string-exceptions into lp:storm

Proposed by Colin Watson
Status: Merged
Merged at revision: 500
Proposed branch: lp:~cjwatson/storm/no-string-exceptions
Merge into: lp:storm
Diff against target: 14 lines (+2/-2)
1 file modified
storm/tz.py (+2/-2)
To merge this branch: bzr merge lp:~cjwatson/storm/no-string-exceptions
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+368438@code.launchpad.net

Commit message

Convert string exceptions to Exception.

Description of the change

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

I'll review this myself since I just extracted it from somebody else's MP.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'storm/tz.py'
2--- storm/tz.py 2019-06-05 11:41:07 +0000
3+++ storm/tz.py 2019-06-06 09:09:16 +0000
4@@ -716,9 +716,9 @@
5 if tzid is None:
6 keys = self._vtz.keys()
7 if len(keys) == 0:
8- raise "no timezones defined"
9+ raise Exception("no timezones defined")
10 elif len(keys) > 1:
11- raise "more than one timezone available"
12+ raise Exception("more than one timezone available")
13 tzid = keys[0]
14 return self._vtz.get(tzid)
15

Subscribers

People subscribed via source and target branches

to status/vote changes: