1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00

add the current working directory to the environment error to help when there are import path issues

This commit is contained in:
Joel Bender 2016-05-05 21:49:21 -04:00
parent d5c08c8a20
commit 1741024050

View File

@ -14,7 +14,11 @@ except ImportError:
version_info = sys.version_info[:2]
source_folder = "py" + str(version_info[0]) + str(version_info[1])
if not os.path.exists(source_folder):
raise EnvironmentError("unsupported version of Python, looking for " + repr(source_folder))
raise EnvironmentError(
"unsupported version of Python, looking for " +
repr(source_folder) + " in " +
os.getcwd()
)
# load in the project metadata
init_py = open(os.path.join(source_folder, 'bacpypes', '__init__.py')).read()