Pārlūkot izejas kodu

Add warnings to decompression errors to see the underlying issue

Todd Lipcon 15 gadi atpakaļ
vecāks
revīzija
ed231a9d0b
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  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: