mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-19 12:51:49 +02:00
hack to check for generator type cause too lazy to import
This commit is contained in:
@@ -432,7 +432,7 @@ def log_archive_method_finished(result: "ArchiveResult"):
|
|||||||
# Prettify error output hints string and limit to five lines
|
# Prettify error output hints string and limit to five lines
|
||||||
hints = getattr(result.output, 'hints', None) or ()
|
hints = getattr(result.output, 'hints', None) or ()
|
||||||
if hints:
|
if hints:
|
||||||
if isinstance(hints, (list, tuple)):
|
if isinstance(hints, (list, tuple, type(_ for _ in ()))):
|
||||||
hints = (hint.decode() for hint in hints if isinstance(hint, bytes))
|
hints = (hint.decode() for hint in hints if isinstance(hint, bytes))
|
||||||
else:
|
else:
|
||||||
if isinstance(hints, bytes):
|
if isinstance(hints, bytes):
|
||||||
|
Reference in New Issue
Block a user