Skip to content

Commit

Permalink
more tacky error handling for hit_create, but at least it raises an e…
Browse files Browse the repository at this point in the history
…xception now
  • Loading branch information
deargle committed Mar 13, 2018
1 parent 4f91369 commit 7ae468c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions psiturk/amt_services_wrapper.py
Expand Up @@ -432,8 +432,10 @@ def hit_create(self, numWorkers, reward, duration):
if create_failed:
print '\n'.join(['*****************************',
' Sorry, there was an error creating hit and registering ad.'])
if fail_msg:
print fail_msg

if fail_msg is None:
fail_msg = ''
raise Exception(fail_msg)

return (hit_id, ad_id)

Expand Down

0 comments on commit 7ae468c

Please sign in to comment.