fix error name
This commit is contained in:
parent
b7bfb259e5
commit
c6db4b187a
1 changed files with 5 additions and 1 deletions
|
@ -171,11 +171,15 @@ class Manager(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _download_error_properties(error, id_, name, claim_dict, report):
|
def _download_error_properties(error, id_, name, claim_dict, report):
|
||||||
|
def error_name(err):
|
||||||
|
if not hasattr(type(err), "__name__"):
|
||||||
|
return str(type(err))
|
||||||
|
return type(err).__name__
|
||||||
return {
|
return {
|
||||||
'download_id': id_,
|
'download_id': id_,
|
||||||
'name': name,
|
'name': name,
|
||||||
'stream_info': claim_dict.source_hash,
|
'stream_info': claim_dict.source_hash,
|
||||||
'error': str(type(error)),
|
'error': error_name(error),
|
||||||
'reason': error.message,
|
'reason': error.message,
|
||||||
'report': report
|
'report': report
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue