Explorar o código

Add warnings to decompression errors to see the underlying issue

Todd Lipcon %!s(int64=15) %!d(string=hai) anos
pai
achega
ed231a9d0b
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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: