Преглед на файлове

Add warnings to decompression errors to see the underlying issue

Todd Lipcon преди 15 години
родител
ревизия
ed231a9d0b
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  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: