mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Use pkgutil in case of any error with pkg_resources (PY-29671)
Problems with `pkg_resources` module shouldn't break working with extensions in debugger.
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import pkgutil
|
||||
import sys
|
||||
import traceback
|
||||
from _pydev_bundle import pydev_log
|
||||
try:
|
||||
import pydevd_plugins.extensions as extensions
|
||||
except:
|
||||
traceback.print_exc()
|
||||
extensions = None
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
try:
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
except ImportError:
|
||||
except:
|
||||
import pkgutil
|
||||
__path__ = pkgutil.extend_path(__path__, __name__)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
try:
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
except ImportError:
|
||||
except:
|
||||
import pkgutil
|
||||
__path__ = pkgutil.extend_path(__path__, __name__)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
try:
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
except ImportError:
|
||||
except:
|
||||
import pkgutil
|
||||
__path__ = pkgutil.extend_path(__path__, __name__)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
try:
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
except ImportError:
|
||||
except:
|
||||
import pkgutil
|
||||
__path__ = pkgutil.extend_path(__path__, __name__)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
try:
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
except ImportError:
|
||||
except:
|
||||
import pkgutil
|
||||
__path__ = pkgutil.extend_path(__path__, __name__)
|
||||
|
||||
Reference in New Issue
Block a user