Fix more incorrect usages of 'is'

(Bitbake rev: a26a2f548419af0e971ad21ec0a29e5245fe307f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Larson 2011-03-08 12:07:24 -07:00 committed by Richard Purdie
parent 626b96e255
commit 67fac77e10
6 changed files with 17 additions and 17 deletions

View File

@ -67,15 +67,15 @@ class Bzr(Fetch):
options = []
if command is "revno":
if command == "revno":
bzrcmd = "%s revno %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
else:
if ud.revision:
options.append("-r %s" % ud.revision)
if command is "fetch":
if command == "fetch":
bzrcmd = "%s co %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
elif command is "update":
elif command == "update":
bzrcmd = "%s pull %s --overwrite" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid bzr command %s" % command)

View File

@ -64,15 +64,15 @@ class Bzr(FetchMethod):
options = []
if command is "revno":
if command == "revno":
bzrcmd = "%s revno %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
else:
if ud.revision:
options.append("-r %s" % ud.revision)
if command is "fetch":
if command == "fetch":
bzrcmd = "%s co %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
elif command is "update":
elif command == "update":
bzrcmd = "%s pull %s --overwrite" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid bzr command %s" % command, ud.url)

View File

@ -92,21 +92,21 @@ class Hg(FetchMethod):
else:
hgroot = ud.user + "@" + host + ud.path
if command is "info":
if command == "info":
return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module)
options = [];
if ud.revision:
options.append("-r %s" % ud.revision)
if command is "fetch":
if command == "fetch":
cmd = "%s clone %s %s://%s/%s %s" % (basecmd, " ".join(options), proto, hgroot, ud.module, ud.module)
elif command is "pull":
elif command == "pull":
# do not pass options list; limiting pull to rev causes the local
# repo not to contain it and immediately following "update" command
# will crash
cmd = "%s pull" % (basecmd)
elif command is "update":
elif command == "update":
cmd = "%s update -C %s" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid hg command %s" % command, ud.url)

View File

@ -68,9 +68,9 @@ class Osc(FetchMethod):
coroot = self._strip_leading_slashes(ud.path)
if command is "fetch":
if command == "fetch":
osccmd = "%s %s co %s/%s %s" % (basecmd, config, coroot, ud.module, " ".join(options))
elif command is "update":
elif command == "update":
osccmd = "%s %s up %s" % (basecmd, config, " ".join(options))
else:
raise FetchError("Invalid osc command %s" % command, ud.url)

View File

@ -85,7 +85,7 @@ class Svn(FetchMethod):
if ud.pswd:
options.append("--password %s" % ud.pswd)
if command is "info":
if command == "info":
svncmd = "%s info %s %s://%s/%s/" % (basecmd, " ".join(options), proto, svnroot, ud.module)
else:
suffix = ""
@ -93,9 +93,9 @@ class Svn(FetchMethod):
options.append("-r %s" % ud.revision)
suffix = "@%s" % (ud.revision)
if command is "fetch":
if command == "fetch":
svncmd = "%s co %s %s://%s/%s%s %s" % (basecmd, " ".join(options), proto, svnroot, ud.module, suffix, ud.module)
elif command is "update":
elif command == "update":
svncmd = "%s update %s" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid svn command %s" % command, ud.url)

View File

@ -929,7 +929,7 @@ class RunQueue:
if self.state is runQueuePrepare:
self.rqexe = RunQueueExecuteDummy(self)
if self.rqdata.prepare() is 0:
if self.rqdata.prepare() == 0:
self.state = runQueueComplete
else:
self.state = runQueueSceneInit
@ -1018,7 +1018,7 @@ class RunQueueExecute:
collect the process exit codes and close the information pipe.
"""
result = os.waitpid(-1, os.WNOHANG)
if result[0] is 0 and result[1] is 0:
if result[0] == 0 and result[1] == 0:
return None
task = self.build_pids[result[0]]
del self.build_pids[result[0]]