diff --git a/archivebox/logging_util.py b/archivebox/logging_util.py index acf62511..e00d4cbb 100644 --- a/archivebox/logging_util.py +++ b/archivebox/logging_util.py @@ -433,11 +433,12 @@ def log_archive_method_finished(result: "ArchiveResult"): hints = getattr(result.output, 'hints', None) or () if hints: 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: if isinstance(hints, bytes): hints = hints.decode() hints = hints.split('\n') + hints = ( ' {}{}{}'.format(ANSI['lightyellow'], line.strip(), ANSI['reset']) for line in hints[:5] if line.strip() diff --git a/archivebox/parsers/__init__.py b/archivebox/parsers/__init__.py index fef1efe1..992446ba 100644 --- a/archivebox/parsers/__init__.py +++ b/archivebox/parsers/__init__.py @@ -8,7 +8,6 @@ For examples of supported import formats see tests/. __package__ = 'archivebox.parsers' import re -import os from io import StringIO from typing import IO, Tuple, List, Optional