This commit is contained in:
1 parent
be4fbf6864
commit
1b7830aa9b
9 files changed
+76
-19
No files matched your search
@@ -118,8 +118,15 @@ def main():
|
||||
cmd = [sys.executable, SERVER, "--port", str(final_port)]
|
||||
if not no_open:
|
||||
cmd.append("--open")
|
||||
return subprocess.call(cmd, cwd=APP_DIR)
|
||||
try:
|
||||
code = subprocess.call(cmd, cwd=APP_DIR)
|
||||
except KeyboardInterrupt:
|
||||
return 0
|
||||
return 0 if code in (0, -1073741510) else code # Ctrl+C on Windows
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
try:
|
||||
raise SystemExit(main())
|
||||
except KeyboardInterrupt:
|
||||
raise SystemExit(0)
|
||||
Reference in new issue
Block a user