mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
Fix "ValueError: Empty module name" when project dir (first argument of django_test_manage.py) ends in a slash
Note that `os.path.basename(path)` returns an empty string (`''`) when `path` ends in a slash. GitOrigin-RevId: e400e794d5e0de0cf29ab6796ffac5972f50eb53
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0415d93257
commit
98d818cf53
@@ -28,7 +28,7 @@ try:
|
||||
# setup environment
|
||||
# this stuff was done earlier by setup_environ() which was removed in 1.4
|
||||
sys.path.append(os.path.join(project_directory, os.pardir))
|
||||
project_name = os.path.basename(project_directory)
|
||||
project_name = os.path.basename(os.path.normpath(project_directory))
|
||||
__import__(project_name)
|
||||
except ImportError:
|
||||
# project has custom structure (project directory is not importable)
|
||||
|
||||
Reference in New Issue
Block a user