mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
This change fixes the error OSError: [WinError 193]
on Windows debuggers (i.e. PyCharm) (#11034)
This commit is contained in:
parent
cb4e886a4f
commit
4e91e6d103
@ -230,7 +230,7 @@ def closefds_osx(min_fd: int, max_fd: int) -> None:
|
|||||||
|
|
||||||
def cmdline() -> List[str]:
|
def cmdline() -> List[str]:
|
||||||
"""Collect path and arguments to re-execute the current hass instance."""
|
"""Collect path and arguments to re-execute the current hass instance."""
|
||||||
if sys.argv[0].endswith(os.path.sep + '__main__.py'):
|
if os.path.basename(sys.argv[0]) == '__main__.py':
|
||||||
modulepath = os.path.dirname(sys.argv[0])
|
modulepath = os.path.dirname(sys.argv[0])
|
||||||
os.environ['PYTHONPATH'] = os.path.dirname(modulepath)
|
os.environ['PYTHONPATH'] = os.path.dirname(modulepath)
|
||||||
return [sys.executable] + [arg for arg in sys.argv if
|
return [sys.executable] + [arg for arg in sys.argv if
|
||||||
|
Loading…
x
Reference in New Issue
Block a user