Explorar el Código

HUE-8042 [editor] Avoid 500 error when the previous query handle was missing

Romain Rigaux hace 7 años
padre
commit
bcbb954
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      desktop/libs/notebook/src/notebook/connectors/hiveserver2.py

+ 1 - 1
desktop/libs/notebook/src/notebook/connectors/hiveserver2.py

@@ -355,8 +355,8 @@ class HS2Api(Api):
     if (snippet['type'] == 'hive' and beeswax_conf.CLOSE_QUERIES.get()) or (snippet['type'] == 'impala' and impala_conf.CLOSE_QUERIES.get()):
       db = self._get_db(snippet)
 
-      handle = self._get_handle(snippet)
       try:
+        handle = self._get_handle(snippet)
         db.close_operation(handle)
       except Exception, e:
         if 'no valid handle' in str(e):