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.
1 parent 967eada commit f1fcdc6Copy full SHA for f1fcdc6
mesa/main.py
@@ -30,11 +30,14 @@ def runserver(project):
30
PROJECT is the path to the directory containing `run.py`, or the current
31
directory if not specified.
32
"""
33
- run_path = Path(project) / "run.py"
34
- if not run_path.exists():
35
- sys.exit(f"ERROR: file {run_path} does not exist")
36
- args = [sys.executable, str(run_path)]
37
- call(args)
+ run_files = ["run.py", "server.py"]
+ for run_file in run_files:
+ run_path = Path(project) / run_file
+ if not run_path.exists():
+ continue
38
+ args = [sys.executable, str(run_path)]
39
+ call(args)
40
+ sys.exit(f"ERROR: file run.py or server.py (in {Path(project)}) does not exist")
41
42
43
@click.command()
0 commit comments