From 67fac77e10269099796a6bd03ddaf1580949a4b8 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Tue, 8 Mar 2011 12:07:24 -0700 Subject: Fix more incorrect usages of 'is' (Bitbake rev: a26a2f548419af0e971ad21ec0a29e5245fe307f) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch/bzr.py | 6 +++--- bitbake/lib/bb/fetch2/bzr.py | 6 +++--- bitbake/lib/bb/fetch2/hg.py | 8 ++++---- bitbake/lib/bb/fetch2/osc.py | 4 ++-- bitbake/lib/bb/fetch2/svn.py | 6 +++--- bitbake/lib/bb/runqueue.py | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/fetch/bzr.py b/bitbake/lib/bb/fetch/bzr.py index 9bde706..85a9294 100644 --- a/bitbake/lib/bb/fetch/bzr.py +++ b/bitbake/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/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py index 201705b..04a9087 100644 --- a/bitbake/lib/bb/fetch2/bzr.py +++ b/bitbake/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/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py index 35a4b3c..f2719d4 100644 --- a/bitbake/lib/bb/fetch2/hg.py +++ b/bitbake/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/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py index 7c4c90c..a16a53e 100644 --- a/bitbake/lib/bb/fetch2/osc.py +++ b/bitbake/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/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py index 607bdd0..fa6c654 100644 --- a/bitbake/lib/bb/fetch2/svn.py +++ b/bitbake/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/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 3773ec0..dcb2e0a 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -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]] -- cgit v1.1