Explorar o código

HUE-4345 [fb] Fix filebrowser tests by avoiding unicode decoding

Jenny Kim %!s(int64=9) %!d(string=hai) anos
pai
achega
2e95812
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      apps/filebrowser/src/filebrowser/views.py

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

@@ -25,7 +25,7 @@ import posixpath
 import re
 import shutil
 import stat as stat_module
-import urllib2
+import urllib
 
 from datetime import datetime
 
@@ -164,7 +164,7 @@ def view(request, path):
             return format_preserving_redirect(request, reverse(view, kwargs=dict(path=request.fs.trash_path)))
 
     try:
-        decoded_path = urllib2.unquote(path).decode('utf8')
+        decoded_path = urllib.unquote(path)
         if path != decoded_path:
           path = decoded_path
         stats = request.fs.stats(path)