[xiph-commits] r13906 - websites/validator.xspf.org

sping at svn.xiph.org sping at svn.xiph.org
Mon Sep 24 16:09:00 PDT 2007


Author: sping
Date: 2007-09-24 16:09:00 -0700 (Mon, 24 Sep 2007)
New Revision: 13906

Modified:
   websites/validator.xspf.org/check.py
Log:
Filename info and no-exit()-for-cgi fix


Modified: websites/validator.xspf.org/check.py
===================================================================
--- websites/validator.xspf.org/check.py	2007-09-24 22:53:40 UTC (rev 13905)
+++ websites/validator.xspf.org/check.py	2007-09-24 23:09:00 UTC (rev 13906)
@@ -229,7 +229,9 @@
 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 @@
         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 @@
 
 
 
-if valid:
-    sys.exit(0)
+if shellMode:
+    if valid:
+        sys.exit(0)
 
-else:
-    sys.exit(1)
+    else:
+        sys.exit(1)



More information about the commits mailing list