summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/patch.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r--meta/lib/oe/patch.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index f4ccb3e183..6f7f90095c 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -2,14 +2,14 @@ import oe.path
2import os 2import os
3import bb.utils, bb.msg, bb.data, bb.fetch2 3import bb.utils, bb.msg, bb.data, bb.fetch2
4 4
5class NotFoundError(Exception): 5class NotFoundError(bb.BBHandledException):
6 def __init__(self, path): 6 def __init__(self, path):
7 self.path = path 7 self.path = path
8 8
9 def __str__(self): 9 def __str__(self):
10 return "Error: %s not found." % self.path 10 return "Error: %s not found." % self.path
11 11
12class CmdError(Exception): 12class CmdError(bb.BBHandledException):
13 def __init__(self, exitstatus, output): 13 def __init__(self, exitstatus, output):
14 self.status = exitstatus 14 self.status = exitstatus
15 self.output = output 15 self.output = output
@@ -207,7 +207,7 @@ class QuiltTree(PatchSet):
207 # read series -> self.patches 207 # read series -> self.patches
208 seriespath = os.path.join(self.dir, 'patches', 'series') 208 seriespath = os.path.join(self.dir, 'patches', 'series')
209 if not os.path.exists(self.dir): 209 if not os.path.exists(self.dir):
210 raise Exception("Error: %s does not exist." % self.dir) 210 raise NotFoundError(self.dir)
211 if os.path.exists(seriespath): 211 if os.path.exists(seriespath):
212 series = file(seriespath, 'r') 212 series = file(seriespath, 'r')
213 for line in series.readlines(): 213 for line in series.readlines():
@@ -228,7 +228,7 @@ class QuiltTree(PatchSet):
228 if sys.exc_value.output.strip() == "No patches applied": 228 if sys.exc_value.output.strip() == "No patches applied":
229 return 229 return
230 else: 230 else:
231 raise sys.exc_value 231 raise
232 output = [val for val in output.split('\n') if not val.startswith('#')] 232 output = [val for val in output.split('\n') if not val.startswith('#')]
233 for patch in self.patches: 233 for patch in self.patches:
234 if os.path.basename(patch["quiltfile"]) == output[-1]: 234 if os.path.basename(patch["quiltfile"]) == output[-1]:
@@ -336,7 +336,7 @@ class NOOPResolver(Resolver):
336 except Exception: 336 except Exception:
337 import sys 337 import sys
338 os.chdir(olddir) 338 os.chdir(olddir)
339 raise sys.exc_value 339 raise
340 340
341# Patch resolver which relies on the user doing all the work involved in the 341# Patch resolver which relies on the user doing all the work involved in the
342# resolution, with the exception of refreshing the remote copy of the patch 342# resolution, with the exception of refreshing the remote copy of the patch