10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
run
1 parent 6519eb6 commit fae1f25Copy full SHA for fae1f25
mypy/dmypy.py
@@ -212,9 +212,7 @@ def do_run(args: argparse.Namespace) -> None:
212
since we don't want to duplicate mypy's huge list of flags.
213
(The -- is only necessary if flags are specified.)
214
"""
215
- try:
216
- get_status()
217
- except BadStatus as err:
+ if not is_running():
218
# Bad or missing status file or dead process; good to start.
219
start_server(args, allow_sources=True)
220
@@ -441,6 +439,15 @@ def read_status() -> Dict[str, object]:
441
439
return data
442
440
443
+def is_running() -> bool:
+ """Check if the server is running cleanly"""
444
+ try:
445
+ get_status()
446
+ except BadStatus as err:
447
+ return False
448
+ return True
449
+
450
451
# Run main().
452
453
if __name__ == '__main__':
0 commit comments