##// END OF EJS Templates
py3: use pycompat.sysstr() in __import__()...
Pulkit Goyal -
r30570:c4c51fd0 default
parent child Browse files
Show More
@@ -18,6 +18,7 b' from .i18n import ('
18 from . import (
18 from . import (
19 cmdutil,
19 cmdutil,
20 error,
20 error,
21 pycompat,
21 util,
22 util,
22 )
23 )
23
24
@@ -74,7 +75,7 b' def loadpath(path, module_name):'
74
75
75 def _importh(name):
76 def _importh(name):
76 """import and return the <name> module"""
77 """import and return the <name> module"""
77 mod = __import__(name)
78 mod = __import__(pycompat.sysstr(name))
78 components = name.split('.')
79 components = name.split('.')
79 for comp in components[1:]:
80 for comp in components[1:]:
80 mod = getattr(mod, comp)
81 mod = getattr(mod, comp)
@@ -31,7 +31,6 b''
31 hgext/fsmonitor/pywatchman/capabilities.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
31 hgext/fsmonitor/pywatchman/capabilities.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
32 hgext/fsmonitor/pywatchman/pybser.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
32 hgext/fsmonitor/pywatchman/pybser.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
33 hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
33 hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
34 hgext/mq.py: error importing: <TypeError> __import__() argument 1 must be str, not bytes (error at extensions.py:*)
35 mercurial/cffi/bdiff.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
34 mercurial/cffi/bdiff.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
36 mercurial/cffi/mpatch.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
35 mercurial/cffi/mpatch.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
37 mercurial/cffi/osutil.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
36 mercurial/cffi/osutil.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
General Comments 0
You need to be logged in to leave comments. Login now