summaryrefslogtreecommitdiff
path: root/classes/patch.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-16 10:45:23 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-16 10:45:23 +0000
commitbc465d83ad8665211b6f9664b418f4eafcc5ca6c (patch)
tree6e46f3cb3096127f0df9825f1670482da199fc9e /classes/patch.bbclass
parentd762c7504032becb9d05cd48c86dabb1ec764911 (diff)
classes: Drop a number of unneeded import calls (from Poky)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'classes/patch.bbclass')
-rw-r--r--classes/patch.bbclass7
1 files changed, 2 insertions, 5 deletions
diff --git a/classes/patch.bbclass b/classes/patch.bbclass
index bb49fed7a1..33184df0d0 100644
--- a/classes/patch.bbclass
+++ b/classes/patch.bbclass
@@ -4,8 +4,6 @@
QUILTRCFILE ?= "${STAGING_BINDIR_NATIVE}/quiltrc"
def patch_init(d):
- import os, sys
-
class NotFoundError(Exception):
def __init__(self, path):
self.path = path
@@ -13,8 +11,6 @@ def patch_init(d):
return "Error: %s not found." % self.path
def md5sum(fname):
- import sys
-
# when we move to Python 2.5 as minimal supported
# we can kill that try/except as hashlib is 2.5+
try:
@@ -251,6 +247,7 @@ def patch_init(d):
try:
output = runcmd(["quilt", "applied"], self.dir)
except CmdError:
+ import sys
if sys.exc_value.output.strip() == "No patches applied":
return
else:
@@ -364,6 +361,7 @@ def patch_init(d):
try:
self.patchset.Push()
except Exception:
+ import sys
os.chdir(olddir)
raise sys.exc_value
@@ -454,7 +452,6 @@ PATCHDEPENDENCY = "${PATCHTOOL}-native:do_populate_staging"
do_patch[depends] = "${PATCHDEPENDENCY}"
python patch_do_patch() {
- import re
patch_init(d)
src_uri = (bb.data.getVar('SRC_URI', d, 1) or '').split()