mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Moved around the exception checking
This commit is contained in:
@@ -17,11 +17,9 @@ def import_corp_details(corp_id, callback=None, **kwargs):
|
||||
except APIAccessException, exc:
|
||||
log.error('Error importing corporation - queueing for retry')
|
||||
import_corp_details.retry(args=[corp_id, callback], exc=exc, kwargs=kwargs)
|
||||
|
||||
else:
|
||||
if callback:
|
||||
subtask(callback).delay(corporation=corp.id)
|
||||
else:
|
||||
return corp
|
||||
|
||||
|
||||
@task()
|
||||
@@ -31,8 +29,7 @@ def import_corp_details_result(corp_id, callback=None):
|
||||
corp = import_corp_details_func(corp_id, log)
|
||||
except APIAccessException, exc:
|
||||
log.error('Error importing corporation')
|
||||
return none
|
||||
|
||||
else:
|
||||
if callback:
|
||||
subtask(callback).delay(corporation=corp.id)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user