Get rid of one more os.getcwd() call

This commit is contained in:
Dave Halter
2020-02-06 01:51:10 +01:00
parent 14ac0512a9
commit f6465c5202

View File

@@ -107,7 +107,7 @@ class Script(object):
if project is None: if project is None:
# Load the Python grammar of the current interpreter. # Load the Python grammar of the current interpreter.
project = get_default_project( project = get_default_project(
os.path.dirname(self.path)if path else os.getcwd() os.path.dirname(self.path) if path else None
) )
# TODO deprecate and remove sys_path from the Script API. # TODO deprecate and remove sys_path from the Script API.
if sys_path is not None: if sys_path is not None: