diff piecrust/processing/tree.py @ 5:474c9882decf

Upgrade to Python 3.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 11 Aug 2014 22:36:47 -0700
parents f485ba500df3
children 0170f449f924
line wrap: on
line diff
--- a/piecrust/processing/tree.py	Mon Aug 11 22:36:36 2014 -0700
+++ b/piecrust/processing/tree.py	Mon Aug 11 22:36:47 2014 -0700
@@ -150,7 +150,7 @@
             except Exception as e:
                 import sys
                 _, __, traceback = sys.exc_info()
-                raise Exception("Error processing: %s" % node.path, e), None, traceback
+                raise Exception("Error processing: %s" % node.path, e).with_traceback(traceback)
 
         # All outputs of a node must go to the same directory, so we can get
         # the output directory off of the first output.
@@ -161,9 +161,9 @@
             if self.lock:
                 with self.lock:
                     if not os.path.isdir(out_dir):
-                        os.makedirs(out_dir, 0755)
+                        os.makedirs(out_dir, 0o755)
             else:
-                os.makedirs(out_dir, 0755)
+                os.makedirs(out_dir, 0o755)
 
         try:
             start_time = time.clock()
@@ -180,7 +180,7 @@
         except Exception as e:
             import sys
             _, __, traceback = sys.exc_info()
-            raise Exception("Error processing: %s" % node.path, e), None, traceback
+            raise Exception("Error processing: %s" % node.path, e).with_traceback(traceback)
 
     def _computeNodeState(self, node):
         if node.state != STATE_UNKNOWN: