Browse Source

Fix indentation.

Rick Bernotas 4 years ago
parent
commit
a71ad4e303
1 changed files with 4 additions and 4 deletions
  1. 4 4
      apps/filebrowser/src/filebrowser/views.py

+ 4 - 4
apps/filebrowser/src/filebrowser/views.py

@@ -921,10 +921,10 @@ def _read_gzip(fhandle, path, offset, length, stats):
   if offset and offset != 0:
   if offset and offset != 0:
     raise PopupException(_("Offsets are not supported with Gzip compression."))
     raise PopupException(_("Offsets are not supported with Gzip compression."))
   try:
   try:
-      if sys.version_info[0] > 2:
-        contents = decompress_gzip(fhandle.read())
-      else:
-        contents = GzipFile('', 'r', 0, string_io(fhandle.read())).read(length)
+    if sys.version_info[0] > 2:
+      contents = decompress_gzip(fhandle.read())
+    else:
+      contents = GzipFile('', 'r', 0, string_io(fhandle.read())).read(length)
   except Exception as e:
   except Exception as e:
     logging.exception('Could not decompress file at "%s": %s' % (path, e))
     logging.exception('Could not decompress file at "%s": %s' % (path, e))
     raise PopupException(_("Failed to decompress file."))
     raise PopupException(_("Failed to decompress file."))