summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-03-08 12:07:24 -0700
committerChris Larson <chris_larson@mentor.com>2011-03-16 07:38:39 -0700
commita26a2f548419af0e971ad21ec0a29e5245fe307f (patch)
tree4cb637769e8716f5eeb9aefc97740eb3414137c7
parent8f5cf3a9975d8e6878e403be0e6edc22cc44f396 (diff)
downloadbitbake-a26a2f548419af0e971ad21ec0a29e5245fe307f.tar.gz
Fix more incorrect usages of 'is'
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r--lib/bb/fetch/bzr.py6
-rw-r--r--lib/bb/fetch2/bzr.py6
-rw-r--r--lib/bb/fetch2/hg.py8
-rw-r--r--lib/bb/fetch2/osc.py4
-rw-r--r--lib/bb/fetch2/svn.py6
-rw-r--r--lib/bb/runqueue.py4
6 files changed, 17 insertions, 17 deletions
diff --git a/lib/bb/fetch/bzr.py b/lib/bb/fetch/bzr.py
index 9bde706df..85a92940e 100644
--- a/lib/bb/fetch/bzr.py
+++ b/lib/bb/fetch/bzr.py
@@ -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)
diff --git a/lib/bb/fetch2/bzr.py b/lib/bb/fetch2/bzr.py
index 201705b6c..04a9087c1 100644
--- a/lib/bb/fetch2/bzr.py
+++ b/lib/bb/fetch2/bzr.py
@@ -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)
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index 35a4b3c30..f2719d4f9 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -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)
diff --git a/lib/bb/fetch2/osc.py b/lib/bb/fetch2/osc.py
index 7c4c90c71..a16a53e54 100644
--- a/lib/bb/fetch2/osc.py
+++ b/lib/bb/fetch2/osc.py
@@ -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)
diff --git a/lib/bb/fetch2/svn.py b/lib/bb/fetch2/svn.py
index 607bdd0cd..fa6c654d3 100644
--- a/lib/bb/fetch2/svn.py
+++ b/lib/bb/fetch2/svn.py
@@ -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)
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index bdc781d9c..85a944199 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -928,7 +928,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
@@ -1017,7 +1017,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]]