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>
This commit is contained in:
parent
c6940a9795
commit
6028daedcb
|
@ -128,7 +128,7 @@ def encodeurl(decoded):
|
||||||
(type, host, path, user, pswd, p) = decoded
|
(type, host, path, user, pswd, p) = decoded
|
||||||
|
|
||||||
if not type or not path:
|
if not type or not path:
|
||||||
fatal("invalid or missing parameters for url encoding")
|
bb.msg.fatal(bb.msg.domain.Fetcher, "invalid or missing parameters for url encoding")
|
||||||
url = '%s://' % type
|
url = '%s://' % type
|
||||||
if user:
|
if user:
|
||||||
url += "%s" % user
|
url += "%s" % user
|
||||||
|
@ -477,7 +477,7 @@ def try_mirrors(d, uri, mirrors, check = False):
|
||||||
try:
|
try:
|
||||||
ud = FetchData(newuri, ld)
|
ud = FetchData(newuri, ld)
|
||||||
except bb.fetch.NoMethodError:
|
except bb.fetch.NoMethodError:
|
||||||
bb.msg.debug(1, bb.msg.domain.Fetcher, "No method for %s" % url)
|
bb.msg.debug(1, bb.msg.domain.Fetcher, "No method for %s" % uri)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
ud.setup_localpath(ld)
|
ud.setup_localpath(ld)
|
||||||
|
|
|
@ -924,7 +924,7 @@ class RunQueue:
|
||||||
|
|
||||||
if self.stats.total == 0:
|
if self.stats.total == 0:
|
||||||
# nothing to do
|
# nothing to do
|
||||||
self.state = runQueueCleanup
|
self.state = runQueueCleanUp
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
task = None
|
task = None
|
||||||
|
|
|
@ -174,7 +174,7 @@ class TaskData:
|
||||||
for dep in task_deps['depends'][task].split():
|
for dep in task_deps['depends'][task].split():
|
||||||
if dep:
|
if dep:
|
||||||
if ":" not in dep:
|
if ":" not in dep:
|
||||||
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))
|
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))
|
||||||
ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1]))
|
ids.append(((self.getbuild_id(dep.split(":")[0])), dep.split(":")[1]))
|
||||||
self.tasks_idepends[taskid].extend(ids)
|
self.tasks_idepends[taskid].extend(ids)
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,8 @@ BitBake Utility Functions
|
||||||
|
|
||||||
separators = ".-"
|
separators = ".-"
|
||||||
|
|
||||||
import re, fcntl, os, types, bb, string
|
import re, fcntl, os, types, bb, string, stat, shutil
|
||||||
|
from commands import getstatusoutput
|
||||||
|
|
||||||
def explode_version(s):
|
def explode_version(s):
|
||||||
r = []
|
r = []
|
||||||
|
@ -516,7 +517,7 @@ def movefile(src,dest,newmtime=None,sstat=None):
|
||||||
return None # failure
|
return None # failure
|
||||||
try:
|
try:
|
||||||
if didcopy:
|
if didcopy:
|
||||||
missingos.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
|
os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
|
||||||
os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
|
os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
|
||||||
os.unlink(src)
|
os.unlink(src)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
@ -536,8 +537,6 @@ def copyfile(src,dest,newmtime=None,sstat=None):
|
||||||
attributes; mtime will be preserved even when moving across
|
attributes; mtime will be preserved even when moving across
|
||||||
filesystems. Returns true on success and false on failure.
|
filesystems. Returns true on success and false on failure.
|
||||||
"""
|
"""
|
||||||
import os, stat, shutil
|
|
||||||
|
|
||||||
#print "copyfile("+src+","+dest+","+str(newmtime)+","+str(sstat)+")"
|
#print "copyfile("+src+","+dest+","+str(newmtime)+","+str(sstat)+")"
|
||||||
try:
|
try:
|
||||||
if not sstat:
|
if not sstat:
|
||||||
|
|
Loading…
Reference in New Issue