Skip to content

Commit 82717de

Browse files
author
Jon Wayne Parrott
committed
Fixing lint issues
Change-Id: I0e14a497f9a07b9d3abcd6ea22a3ce6b8ab34916
1 parent 86b6ed8 commit 82717de

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

storage/gcloud/customer_supplied_keys.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def upload_object(storage_client,
6161
bucket = storage_client.get_bucket(bucket_name)
6262
blob = bucket.blob(object_name)
6363
with open(filename, 'rb') as f:
64-
blob.upload_from_file(f, encryption_key=encryption_key)
64+
blob.upload_from_file(f, encryption_key=encryption_key)
6565

6666

6767
def download_object(storage_client,
@@ -92,17 +92,21 @@ def main(bucket, filename):
9292
upload_object(storage_client, bucket, filename, filename, ENCRYPTION_KEY)
9393
print('Downloading it back')
9494
with tempfile.NamedTemporaryFile(mode='w+b') as tmpfile:
95-
download_object(storage_client, bucket, object_name=filename,
96-
filename=tmpfile.name, encryption_key=ENCRYPTION_KEY)
95+
download_object(
96+
storage_client,
97+
bucket,
98+
object_name=filename,
99+
filename=tmpfile.name,
100+
encryption_key=ENCRYPTION_KEY)
97101
assert filecmp.cmp(filename, tmpfile.name), \
98102
'Downloaded file has different content from the original file.'
99103
print('Done')
100104

101105

102106
if __name__ == '__main__':
103107
parser = argparse.ArgumentParser(
104-
description=__doc__,
105-
formatter_class=argparse.RawDescriptionHelpFormatter)
108+
description=__doc__,
109+
formatter_class=argparse.RawDescriptionHelpFormatter)
106110
parser.add_argument('bucket', help='Your Cloud Storage bucket.')
107111
parser.add_argument('filename', help='A file to upload and download.')
108112

0 commit comments

Comments
 (0)