mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
PY-53088 Make syspath.py helper work regardless of the way it's launched
Previously, it relied on the path the script was launched with to detect and exclude "helpers" root from the results. Now it uses __file__ to find the directory it resides in. GitOrigin-RevId: fd3edce1a6a33fd82607953f75cafa5c558373cd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
abf8acd8ba
commit
d2e5565c9e
@@ -1,4 +1,8 @@
|
||||
import sys
|
||||
import os.path
|
||||
for x in sys.path:
|
||||
if x != os.path.dirname(sys.argv [0]) and x != '.': sys.stdout.write(x+chr(10))
|
||||
import sys
|
||||
|
||||
_helpers_root = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
for root in sys.path:
|
||||
if root != _helpers_root and root != os.curdir:
|
||||
print(root)
|
||||
|
||||
Reference in New Issue
Block a user