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.
How do I tell boto operation was successful?
-
04-10-2022 - |
Question
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.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow