better error handling
authorhaftmann
Tue, 04 Oct 2005 14:37:06 +0200
changeset 17751 2cc8429943f2
parent 17750 a0745bc36660
child 17752 a92cda068ad8
better error handling
Admin/website/build/pypager.py
Admin/website/build/set_perm.bash
--- a/Admin/website/build/pypager.py	Tue Oct 04 11:15:09 2005 +0200
+++ b/Admin/website/build/pypager.py	Tue Oct 04 14:37:06 2005 +0200
@@ -490,8 +490,13 @@
         ostream = sys.stdout
 
     # process file
-    transformer = TransformerHandler(ostream, outputEncoding, options.dtd, func)
-    parseWithER(istream, transformer)
+    try:
+        transformer = TransformerHandler(ostream, outputEncoding, options.dtd, func)
+        parseWithER(istream, transformer)
+    except Exception:
+        if dst is not None:
+            os.unlink(dst)
+        raise
 
     # close handles
     ostream.close()
--- a/Admin/website/build/set_perm.bash	Tue Oct 04 11:15:09 2005 +0200
+++ b/Admin/website/build/set_perm.bash	Tue Oct 04 14:37:06 2005 +0200
@@ -20,7 +20,7 @@
         else
             if [ -x "$file" ]
             then
-                chmod "$LOCAL_UMASK_FILE",u+x,g+x,o+x "$file"
+                chmod "$LOCAL_UMASK_FILE",u+x,g+x "$file"
             else
                 chmod "$LOCAL_UMASK_FILE" "$file"
             fi