patch.bbclass:
authorChris Larson <clarson@kergoth.com>
Wed, 30 Aug 2006 08:32:22 +0000 (08:32 +0000)
committerChris Larson <clarson@kergoth.com>
Wed, 30 Aug 2006 08:32:22 +0000 (08:32 +0000)
* switch os.mkdir to os.makedirs.
* pass on all errors from QuiltTree.Clean(), as it can fail in ways that do
  not need to be reported to the user, and a failure will end up being seen
  again during the Import/Push of the patches.

classes/patch.bbclass

index 7bb0900..5e40b3d 100644 (file)
@@ -176,16 +176,13 @@ def patch_init(d):
                        self.initialized = False
                        p = os.path.join(self.dir, 'patches')
                        if not os.path.exists(p):
-                               os.mkdir(p)
+                               os.makedirs(p)
 
                def Clean(self):
                        try:
                                self._runcmd(["pop", "-a", "-f"])
-                       except CmdError:
-                               pass
-                       except NotFoundError:
+                       except Exception:
                                pass
-                       # runcmd(["rm", "-rf", os.path.join(self.dir, "patches"), os.path.join(self.dir, ".pc")])
                        self.initialized = True
 
                def InitFromDir(self):