I'm doing fairy straightforward uploading with boto
for path, dirs, files in os.walk("data"):
for file in files:
k = Key(bucket)
k.key = file
k.set_contents_from_filename(os.path.join(path,file))
but set_contents_from_filename does not return anything. How do I tell the operation was success and not failed silently? I'm using RiakCS as a backend if it is important.
Since all of the underlying service requests that boto makes are HTTP-based, boto monitors the status codes and raises a Python exception if the HTTP status code does not indicate success. So, if it doesn't raise an exception it should be successful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With