Explorar o código

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

Ying Chen %!s(int64=6) %!d(string=hai) anos
pai
achega
b392db3b47

+ 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():