Bug 782037 - Fix NameError with missing `depfinished` function when there is a makefile error. r=gps
authorZiga Seilnacht <ziga.seilnacht@gmail.com>
Fri, 08 Nov 2013 09:01:27 -0500
changeset 358 87a4f61ed5fe
parent 357 166a45b029b9
child 359 f99dd2f10896
push id228
push userryanvm@gmail.com
push dateFri, 08 Nov 2013 14:02:32 +0000
reviewersgps
bugs782037
Bug 782037 - Fix NameError with missing `depfinished` function when there is a makefile error. r=gps
pymake/data.py
--- a/pymake/data.py
+++ b/pymake/data.py
@@ -840,21 +840,25 @@ class RemakeRuleContext(object):
         else:
             self.resolvecb(error=self.error, didanything=self.didanything)
 
     def _resolvedepsserial(self):
         self.resolvelist = list(self.deps)
         self._depfinishedserial(False, False)
 
     def _startdepparallel(self, d):
+        dep, weak = d
+        if weak:
+            depfinished = self._weakdepfinishedparallel
+        else:
+            depfinished = self._depfinishedparallel
         if self.makefile.error:
             depfinished(True, False)
         else:
-            dep, weak = d
-            dep.make(self.makefile, self.targetstack, weak and self._weakdepfinishedparallel or self._depfinishedparallel)
+            dep.make(self.makefile, self.targetstack, depfinished)
 
     def _weakdepfinishedparallel(self, error, didanything):
         if error:
             self.remake = True
         self._depfinishedparallel(False, didanything)
 
     def _depfinishedparallel(self, error, didanything):
         assert error in (True, False)