Browse Source

hack to check for generator type cause too lazy to import

Nick Sweeting 3 năm trước cách đây
mục cha
commit
0b4df768ba
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      archivebox/logging_util.py

+ 1 - 1
archivebox/logging_util.py

@@ -432,7 +432,7 @@ def log_archive_method_finished(result: "ArchiveResult"):
         # Prettify error output hints string and limit to five lines
         hints = getattr(result.output, 'hints', None) or ()
         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))
             else:
                 if isinstance(hints, bytes):