소스 검색

HUE-8737 [core] Fix instrumentation setting in py3 and remove unused import in proxyfs.py

Ying Chen 6 년 전
부모
커밋
b392db3b47
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 2
      desktop/core/src/desktop/lib/fs/proxyfs.py
  2. 5 1
      desktop/core/src/desktop/settings.py

+ 0 - 2
desktop/core/src/desktop/lib/fs/proxyfs.py

@@ -22,8 +22,6 @@ from builtins import object
 import logging
 import sys
 
-from urlparse import urlparse
-
 from useradmin.models import User
 
 from desktop.auth.backend import is_admin

+ 5 - 1
desktop/core/src/desktop/settings.py

@@ -603,7 +603,11 @@ if os.environ.get('REQUESTS_CA_BUNDLE') and os.environ.get('REQUESTS_CA_BUNDLE')
 
 # Instrumentation
 if desktop.conf.INSTRUMENTATION.get():
-  gc.set_debug(gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_OBJECTS)
+  if sys.version_info[0] > 2:
+    gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
+  else:
+    gc.set_debug(gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_OBJECTS)
+
 
 if not desktop.conf.DATABASE_LOGGING.get():
   def disable_database_logging():