launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25912
[Merge] ~cjwatson/launchpad:fix-stormify-builder-2 into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:fix-stormify-builder-2 into launchpad:master.
Commit message:
Fix SlaveScanner.updateVersion harder
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/395740
We don't want to raise TypeError if slave_status.get("builder_version") is None.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:fix-stormify-builder-2 into launchpad:master.
diff --git a/lib/lp/buildmaster/manager.py b/lib/lp/buildmaster/manager.py
index 5cf5543..dd2ae0f 100644
--- a/lib/lp/buildmaster/manager.py
+++ b/lib/lp/buildmaster/manager.py
@@ -595,7 +595,9 @@ class SlaveScanner:
def updateVersion(self, vitals, slave_status):
"""Update the DB's record of the slave version if necessary."""
- version = six.ensure_text(slave_status.get("builder_version"))
+ version = slave_status.get("builder_version")
+ if version is not None:
+ version = six.ensure_text(version)
if version != vitals.version:
self.builder_factory[self.builder_name].version = version
transaction.commit()