This change fixes the error OSError: [WinError 193]
on Windows debuggers (i.e. PyCharm) (#11034)
This commit is contained in:
parent
cb4e886a4f
commit
4e91e6d103
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ def closefds_osx(min_fd: int, max_fd: int) -> None:
|
|||
|
||||
def cmdline() -> List[str]:
|
||||
"""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])
|
||||
os.environ['PYTHONPATH'] = os.path.dirname(modulepath)
|
||||
return [sys.executable] + [arg for arg in sys.argv if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue