From 758baca01a7da1b9f0b3eae1b080cc26b12c8343 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 15 Oct 2015 12:44:48 -0400 Subject: [PATCH] run-dev.py: Report a nice error if you run it as root. Fixes #172. --- tools/run-dev.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/run-dev.py b/tools/run-dev.py index cff4fc172a..4a1c46d51f 100755 --- a/tools/run-dev.py +++ b/tools/run-dev.py @@ -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.