Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: cms/bin/test_server.py

Issue 6236544096534528: Issue 2578 - Refactored and added missing hidden import (Closed)
Patch Set: Created May 22, 2015, 9:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runserver.py » ('j') | runserver.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/bin/test_server.py
===================================================================
--- a/cms/bin/test_server.py
+++ b/cms/bin/test_server.py
@@ -99,10 +99,11 @@
if __name__ == "__main__":
if len(sys.argv) < 2:
- print >>sys.stderr, "Usage: %s source_dir" % sys.argv[0]
- sys.exit(1)
-
- source = FileSource(sys.argv[1])
+ source = FileSource(os.curdir)
+ elif os.path.isdir(sys.argv[1]):
+ source = FileSource(sys.argv[1])
+ else:
+ sys.exit("Usage: %s [source_dir]" % sys.argv[0])
try:
from werkzeug.serving import run_simple
« no previous file with comments | « no previous file | runserver.py » ('j') | runserver.py » ('J')

Powered by Google App Engine
This is Rietveld