Martin Blanchard pushed to branch master at BuildGrid / buildgrid
Commits:
-
65f4b337
by Martin Blanchard at 2018-10-03T14:08:14Z
1 changed file:
Changes:
... | ... | @@ -241,7 +241,7 @@ class Downloader: |
241 | 241 |
"""Fetches a blob using ByteStream.Read()"""
|
242 | 242 |
read_blob = bytearray()
|
243 | 243 |
|
244 |
- if self.instance_name is not None:
|
|
244 |
+ if self.instance_name:
|
|
245 | 245 |
resource_name = '/'.join([self.instance_name, 'blobs',
|
246 | 246 |
digest.hash, str(digest.size_bytes)])
|
247 | 247 |
else:
|
... | ... | @@ -313,7 +313,7 @@ class Downloader: |
313 | 313 |
|
314 | 314 |
def _fetch_file(self, digest, file_path):
|
315 | 315 |
"""Fetches a file using ByteStream.Read()"""
|
316 |
- if self.instance_name is not None:
|
|
316 |
+ if self.instance_name:
|
|
317 | 317 |
resource_name = '/'.join([self.instance_name, 'blobs',
|
318 | 318 |
digest.hash, str(digest.size_bytes)])
|
319 | 319 |
else:
|
... | ... | @@ -699,7 +699,7 @@ class Uploader: |
699 | 699 |
else:
|
700 | 700 |
blob_digest.hash = HASH(blob).hexdigest()
|
701 | 701 |
blob_digest.size_bytes = len(blob)
|
702 |
- if self.instance_name is not None:
|
|
702 |
+ if self.instance_name:
|
|
703 | 703 |
resource_name = '/'.join([self.instance_name, 'uploads', self.u_uid, 'blobs',
|
704 | 704 |
blob_digest.hash, str(blob_digest.size_bytes)])
|
705 | 705 |
else:
|