We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd1aece commit ca2d5fcCopy full SHA for ca2d5fc
1 file changed
storage/api/crud_object.py
@@ -24,7 +24,6 @@
24
"""
25
26
import argparse
27
-import filecmp
28
import json
29
import tempfile
30
@@ -40,12 +39,8 @@ def main(bucket, filename, readers=[], owners=[]):
40
39
print(json.dumps(resp, indent=2))
41
42
print('Fetching object..')
43
- with tempfile.NamedTemporaryFile(mode='w+b') as tmpfile:
+ with tempfile.TemporaryFile(mode='w+b') as tmpfile:
44
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')
49
50
print('Deleting object..')
51
resp = delete_object(bucket, filename)
0 commit comments