diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-03-24 17:48:49 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-03-25 17:25:56 +0000 |
commit | 6028daedcb2e3eeab8bb7c725de4303b03625ed8 (patch) | |
tree | 0b0f74bb6767b6853bef46424882b3b7fc2aafc9 /bitbake | |
parent | c6940a97958be1d9981a3b5fb3ae27f74414e57f (diff) | |
download | poky-6028daedcb2e3eeab8bb7c725de4303b03625ed8.tar.gz |
Fix 7 references to undefined variables, as spotted by pyflakes
(Bitbake rev: e1e4ccf203e38070eeafd31a622671996cff61a1)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/taskdata.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/utils.py | 7 |
4 files changed, 7 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 5616c79ab0..e6cc1c535b 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -128,7 +128,7 @@ def encodeurl(decoded): | |||
128 | (type, host, path, user, pswd, p) = decoded | 128 | (type, host, path, user, pswd, p) = decoded |
129 | 129 | ||
130 | if not type or not path: | 130 | if not type or not path: |
131 | fatal("invalid or missing parameters for url encoding") | 131 | bb.msg.fatal(bb.msg.domain.Fetcher, "invalid or missing parameters for url encoding") |
132 | url = '%s://' % type | 132 | url = '%s://' % type |
133 | if user: | 133 | if user: |
134 | url += "%s" % user | 134 | url += "%s" % user |
@@ -477,7 +477,7 @@ def try_mirrors(d, uri, mirrors, check = False): | |||
477 | try: | 477 | try: |
478 | ud = FetchData(newuri, ld) | 478 | ud = FetchData(newuri, ld) |
479 | except bb.fetch.NoMethodError: | 479 | except bb.fetch.NoMethodError: |
480 | bb.msg.debug(1, bb.msg.domain.Fetcher, "No method for %s" % url) | 480 | bb.msg.debug(1, bb.msg.domain.Fetcher, "No method for %s" % uri) |
481 | continue | 481 | continue |
482 | 482 | ||
483 | ud.setup_localpath(ld) | 483 | ud.setup_localpath(ld) |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 887cb5c2b6..c5f4380c86 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -924,7 +924,7 @@ class RunQueue: | |||
924 | 924 | ||
925 | if self.stats.total == 0: | 925 | if self.stats.total == 0: |
926 | # nothing to do | 926 | # nothing to do |
927 | self.state = runQueueCleanup | 927 | self.state = runQueueCleanUp |
928 | 928 | ||
929 | while True: | 929 | while True: |
930 | task = None | 930 | task = None |
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index 841d243e54..3e5e006f5f 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py | |||
@@ -174,7 +174,7 @@ class TaskData: | |||
174 | for dep in task_deps['depends'][task].split(): | 174 | for dep in task_deps['depends'][task].split(): |
175 | if dep: | 175 | if dep: |
176 | if ":" not in dep: | 176 | if ":" not in dep: |
177 | bb.msg.fatal(bb.msg.domain.TaskData, "Error, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (depend, fn)) | 177 | bb.msg.fatal(bb.msg.domain.TaskData, "Error, dependency %s does not contain ':' character\n. Task 'depends' should be specified in the form 'packagename:task'" % (dep, fn)) |
178 | ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1])) | 178 | ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1])) |
179 | self.tasks_idepends[taskid].extend(ids) | 179 | self.tasks_idepends[taskid].extend(ids) |
180 | 180 | ||
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 5b7e7a3608..ad0aa68b27 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -21,7 +21,8 @@ BitBake Utility Functions | |||
21 | 21 | ||
22 | separators = ".-" | 22 | separators = ".-" |
23 | 23 | ||
24 | import re, fcntl, os, types, bb, string | 24 | import re, fcntl, os, types, bb, string, stat, shutil |
25 | from commands import getstatusoutput | ||
25 | 26 | ||
26 | def explode_version(s): | 27 | def explode_version(s): |
27 | r = [] | 28 | r = [] |
@@ -516,7 +517,7 @@ def movefile(src,dest,newmtime=None,sstat=None): | |||
516 | return None # failure | 517 | return None # failure |
517 | try: | 518 | try: |
518 | if didcopy: | 519 | if didcopy: |
519 | missingos.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) | 520 | os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) |
520 | os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown | 521 | os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown |
521 | os.unlink(src) | 522 | os.unlink(src) |
522 | except Exception, e: | 523 | except Exception, e: |
@@ -536,8 +537,6 @@ def copyfile(src,dest,newmtime=None,sstat=None): | |||
536 | attributes; mtime will be preserved even when moving across | 537 | attributes; mtime will be preserved even when moving across |
537 | filesystems. Returns true on success and false on failure. | 538 | filesystems. Returns true on success and false on failure. |
538 | """ | 539 | """ |
539 | import os, stat, shutil | ||
540 | |||
541 | #print "copyfile("+src+","+dest+","+str(newmtime)+","+str(sstat)+")" | 540 | #print "copyfile("+src+","+dest+","+str(newmtime)+","+str(sstat)+")" |
542 | try: | 541 | try: |
543 | if not sstat: | 542 | if not sstat: |