Skip to content

Commit ca2d5fc

Browse files
jerjouJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Remove unnecessary file comparison. (GoogleCloudPlatform#710)
1 parent fd1aece commit ca2d5fc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

storage/api/crud_object.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"""
2525

2626
import argparse
27-
import filecmp
2827
import json
2928
import tempfile
3029

@@ -40,12 +39,8 @@ def main(bucket, filename, readers=[], owners=[]):
4039
print(json.dumps(resp, indent=2))
4140

4241
print('Fetching object..')
43-
with tempfile.NamedTemporaryFile(mode='w+b') as tmpfile:
42+
with tempfile.TemporaryFile(mode='w+b') as tmpfile:
4443
get_object(bucket, filename, out_file=tmpfile)
45-
tmpfile.seek(0)
46-
47-
if not filecmp.cmp(filename, tmpfile.name):
48-
raise Exception('Downloaded file != uploaded object')
4944

5045
print('Deleting object..')
5146
resp = delete_object(bucket, filename)

0 commit comments

Comments
 (0)