Procházet zdrojové kódy

Add warnings to decompression errors to see the underlying issue

Todd Lipcon před 15 roky
rodič
revize
81b417395f
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  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:
       try:
         contents = GzipFile('', 'r', 0, StringIO(f.read())).read(length)
         contents = GzipFile('', 'r', 0, StringIO(f.read())).read(length)
       except:
       except:
+        logging.warn("Could not decompress file at %s" % path, exc_info=True)
         contents = ''
         contents = ''
         raise PopupException("Failed to decompress file")
         raise PopupException("Failed to decompress file")
     finally:
     finally: