summaryrefslogtreecommitdiff
path: root/buildstream/_artifactcache/pushreceive.py
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2018-02-14 15:58:42 +0000
committerJames Ennis <james.ennis@codethink.com>2018-03-14 14:10:26 +0000
commit4741d1379a6e17048423f0e08588b607668ab98a (patch)
tree91d1815aa482df35786cebb94d4a650a073194d4 /buildstream/_artifactcache/pushreceive.py
parent05fa346f9911638b272eca0b62a110b590803ab2 (diff)
downloadbuildstream-4741d1379a6e17048423f0e08588b607668ab98a.tar.gz
pylint - dealt with len-as-condition warning
Diffstat (limited to 'buildstream/_artifactcache/pushreceive.py')
-rw-r--r--buildstream/_artifactcache/pushreceive.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_artifactcache/pushreceive.py b/buildstream/_artifactcache/pushreceive.py
index b23dc1a84..33f19859c 100644
--- a/buildstream/_artifactcache/pushreceive.py
+++ b/buildstream/_artifactcache/pushreceive.py
@@ -247,7 +247,7 @@ class PushMessageReader(object):
def read(self):
header = self.file.read(HEADER_SIZE)
- if len(header) == 0:
+ if not header:
# Remote end quit
return None, None
order, version, cmdtype, size = self.decode_header(header)
@@ -510,7 +510,7 @@ class OSTreePusher(object):
remote_rev = remote_refs.get(branch, '0' * 64)
if rev != remote_rev:
update_refs[branch] = remote_rev, rev
- if len(update_refs) == 0:
+ if not update_refs:
logging.info('Nothing to update')
self.writer.send_done()
return self.close()
@@ -632,7 +632,7 @@ class OSTreeReceiver(object):
self.reader.receive_done()
# If we didn't get any objects, we're done
- if len(received_objects) == 0:
+ if not received_objects:
return 0
# Got all objects, move them to the object store