Browse Source

HUE-8737 [fb] Fix python3 port creating 500 on down HDFS

Romain 6 years ago
parent
commit
19fc1ee3f2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/filebrowser/src/filebrowser/views.py

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

@@ -225,7 +225,7 @@ def view(request, path):
     except (IOError, WebHdfsException) as e:
     except (IOError, WebHdfsException) as e:
         msg = _("Cannot access: %(path)s. ") % {'path': escape(path)}
         msg = _("Cannot access: %(path)s. ") % {'path': escape(path)}
 
 
-        if "Connection refused" in e.args[0]:
+        if "Connection refused" in str(e):
             msg += _(" The HDFS REST service is not available. ")
             msg += _(" The HDFS REST service is not available. ")
 
 
         if request.is_ajax():
         if request.is_ajax():