Skip to content

Commit dc3172b

Browse files
committed
Error checking for non-existant bucket
1 parent 151511a commit dc3172b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

s3-mp-upload.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def main(src, dest, num_processes=2, split=50, force=False, reduced_redundancy=F
8383

8484
s3 = boto.connect_s3()
8585
bucket = s3.lookup(split_rs.netloc)
86+
if bucket == None:
87+
raise ValueError("Bucket '%s' does not exisit." % split_rs.netloc)
8688
key = bucket.get_key(split_rs.path)
8789
# See if we're overwriting an existing key
8890
if key is not None:

0 commit comments

Comments
 (0)