[kupu-checkins] r39389 - kupu/trunk/kupu

fschulze at codespeak.net fschulze at codespeak.net
Sun Feb 25 19:37:09 CET 2007


Author: fschulze
Date: Sun Feb 25 19:37:01 2007
New Revision: 39389

Modified:
   kupu/trunk/kupu/jslint.js
   kupu/trunk/kupu/lint.py
Log:
Some fixes for non windows machines.

Modified: kupu/trunk/kupu/jslint.js
==============================================================================
--- kupu/trunk/kupu/jslint.js	(original)
+++ kupu/trunk/kupu/jslint.js	Sun Feb 25 19:37:01 2007
@@ -3002,7 +3002,7 @@
     return result;
 }
 
-if (WScript) {
+if (typeof(WScript) != 'undefined') {
     var arguments = [];
     for (var arg = 0; arg < WScript.Arguments.Count(); arg++) {
         arguments.push(WScript.Arguments(arg));

Modified: kupu/trunk/kupu/lint.py
==============================================================================
--- kupu/trunk/kupu/lint.py	(original)
+++ kupu/trunk/kupu/lint.py	Sun Feb 25 19:37:01 2007
@@ -14,8 +14,10 @@
 import threading
 
 COMPILE_COMMAND = "java org.mozilla.javascript.tools.shell.Main %(lint)s --options %(options)s %(file)s"
+ERRORS = (IOError, )
 if sys.platform=='win32':
     COMPILE_COMMAND = "cscript /NoLogo %(lint)s --options %(options)s %(file)s"
+    ERRORS = (IOError, WindowsError)
 
 def lint(name):
     cmd = COMPILE_COMMAND % dict(lint=LINT, file=name, options=OPTIONS)
@@ -50,14 +52,14 @@
 def basetime(marker):
     try:
         mtime = os.stat(marker).st_mtime
-    except (IOError, WindowsError):
+    except ERRORS:
         mtime = 0.0
     return mtime
 
 def loadstatus(name):
     try:
         f = open(name, 'rb')
-    except (IOError, WindowsError):
+    except ERRORS:
         return {}
     try:
         try:


More information about the kupu-checkins mailing list