Skip to content

Commit

Permalink
Bugfix reloading when invocated as python -m hypercorn
Browse files Browse the repository at this point in the history
Previously it would try `python module:app -m hypercorn` instead of
the correct ordering `python -m hypercorn module:app`.
  • Loading branch information
pgjones committed Mar 16, 2019
1 parent 83de54f commit bb6989d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hypercorn/utils.py
Expand Up @@ -119,7 +119,7 @@ def restart() -> None:
import_name = main_package
if module != "__main__":
import_name = f"{main_package}.{module}"
args.extend(["-m", import_name.lstrip(".")])
args[:0] = ["-m", import_name.lstrip(".")]

os.execv(executable, [executable] + args)

Expand Down

0 comments on commit bb6989d

Please sign in to comment.