Jun-19-2019, 09:50 AM
I tried to use pkg_resources module in rbtools but I got exception as No module named _imp.
In python 2.7.15rc1 (/usr/lib/python2.7/dist-packages/pkg_resources), we handled if _imp module is not found then we are importing "imp as _imp" in except block.
try:
import _imp
except ImportError:
# Python 3.2 compatibility
import imp as _imp
Here the issue is, try block doesn't raise exception and not handled in except block to set it from imp module.
Please help to resolve this issue. Thanks in advance!
OS: Ubuntu 18.04
In python 2.7.15rc1 (/usr/lib/python2.7/dist-packages/pkg_resources), we handled if _imp module is not found then we are importing "imp as _imp" in except block.
try:
import _imp
except ImportError:
# Python 3.2 compatibility
import imp as _imp
Here the issue is, try block doesn't raise exception and not handled in except block to set it from imp module.
Please help to resolve this issue. Thanks in advance!
OS: Ubuntu 18.04