瀏覽代碼

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: