Skip to content

Commit

Permalink
don't use type(e) for an exception - doesn't work on py24
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Dec 11, 2011
1 parent 9d13649 commit 9d4205f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions master/buildbot/test/unit/test_schedulers_forcesched.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ def do_ParameterTest(self, value, expect, klass, owner='user', req=None,
try:
d = sched.forceWithWebRequest(owner, 'a', req)
except Exception,e:
if type(e)!=expect:
raise e
assert type(e)==expect
return
if not isinstance(e, expect):
raise
return # success
def check(res):
bsid,brids = res
self.db.buildsets.assertBuildset\
Expand Down

0 comments on commit 9d4205f

Please sign in to comment.