소스 검색

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

Ivan Dzikovsky 7 년 전
부모
커밋
53fc922425
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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)