run-dev.py: Report a nice error if you run it as root.

Fixes #172.
This commit is contained in:
Tim Abbott 2015-10-15 12:44:48 -04:00
parent 3167b64d1c
commit 758baca01a
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ def patched_finish(self):
return orig_finish(self)
Request.finish = patched_finish
if 'posix' in os.name and os.geteuid() == 0:
raise RuntimeError("run-dev.py should not be run as root.")
parser = optparse.OptionParser(r"""
Starts the app listening on localhost, for local development.