Commit 3e138a67 authored by Sebastian Pipping's avatar Sebastian Pipping

Filename info and no-exit()-for-cgi fix


git-svn-id: https://svn.xiph.org/websites/validator.xspf.org@13906 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent c955d4c1
......@@ -229,7 +229,9 @@ valid = False
intro = ""
input = ""
shellMode = False
if (len(sys.argv) == 3) and (sys.argv[1] == "--shell"):
shellMode = True
try:
f = open(sys.argv[2])
try:
......@@ -240,7 +242,7 @@ if (len(sys.argv) == 3) and (sys.argv[1] == "--shell"):
pass
if input != "":
intro = "Validating pasted text<br><br>"
intro = "Validating local file<br><b><i>" + sys.argv[2] + "</i></b><br><br>"
else:
form = cgi.FieldStorage()
......@@ -1227,8 +1229,9 @@ print """
if valid:
sys.exit(0)
if shellMode:
if valid:
sys.exit(0)
else:
sys.exit(1)
else:
sys.exit(1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment