← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:building-slave-write-bytes into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:building-slave-write-bytes into launchpad:master.

Commit message:
Write bytes in the buildlog case in BuildingSlave.getFile

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/399286

This is probably unused at the moment, since otherwise it would have caused a test failure on Python 3, but it seems useful enough to keep.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:building-slave-write-bytes into launchpad:master.
diff --git a/lib/lp/buildmaster/tests/mock_slaves.py b/lib/lp/buildmaster/tests/mock_slaves.py
index 7e19f5b..54944e3 100644
--- a/lib/lp/buildmaster/tests/mock_slaves.py
+++ b/lib/lp/buildmaster/tests/mock_slaves.py
@@ -177,7 +177,7 @@ class BuildingSlave(OkSlave):
         if sum == "buildlog":
             if isinstance(file_to_write, six.string_types):
                 file_to_write = open(file_to_write, 'wb')
-            file_to_write.write("This is a build log")
+            file_to_write.write(b"This is a build log")
             file_to_write.close()
         return defer.succeed(None)