fix error name

This commit is contained in:
Jack Robison 2017-09-28 15:45:24 -04:00
parent b7bfb259e5
commit c6db4b187a
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -171,11 +171,15 @@ class Manager(object):
@staticmethod
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 {
'download_id': id_,
'name': name,
'stream_info': claim_dict.source_hash,
'error': str(type(error)),
'error': error_name(error),
'reason': error.message,
'report': report
}