Browse Source

Add warnings to decompression errors to see the underlying issue

Todd Lipcon 15 năm trước cách đây
mục cha
commit
ed231a9d0b
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      apps/filebrowser/src/filebrowser/views.py

+ 1 - 0
apps/filebrowser/src/filebrowser/views.py

@@ -417,6 +417,7 @@ def display(request, path):
       try:
         contents = GzipFile('', 'r', 0, StringIO(f.read())).read(length)
       except:
+        logging.warn("Could not decompress file at %s" % path, exc_info=True)
         contents = ''
         raise PopupException("Failed to decompress file")
     finally: