Browse Source

HUE-8309 [editor] Exceptions while typing path to file in Hive editor manually (#695)

Ivan Dzikovsky 7 years ago
parent
commit
53fc922425
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/libs/notebook/src/notebook/api.py

+ 1 - 1
desktop/libs/notebook/src/notebook/api.py

@@ -819,5 +819,5 @@ def _get_statement_from_file(user, fs, snippet):
   script_path = snippet['statementPath']
   script_path = snippet['statementPath']
   if script_path:
   if script_path:
     script_path = script_path.replace('hdfs://', '')
     script_path = script_path.replace('hdfs://', '')
-    if fs.do_as_user(user, fs.exists, script_path):
+    if fs.do_as_user(user, fs.isfile, script_path):
       return fs.do_as_user(user, fs.read, script_path, 0, 16 * 1024 ** 2)
       return fs.do_as_user(user, fs.read, script_path, 0, 16 * 1024 ** 2)