Incorrect check for upload from stdin caused failure
in recursive put uploads
... | ... |
@@ -280,10 +280,8 @@ def cmd_object_put(args): |
280 | 280 |
info(u"Summary: %d local files to upload" % local_count) |
281 | 281 |
|
282 | 282 |
if local_count > 0: |
283 |
- if not single_file_local: |
|
284 |
- for key in local_list: |
|
285 |
- if key == "-": |
|
286 |
- raise ParameterError("Cannot specify multiple local files if uploading from '-' (ie stdin)") |
|
283 |
+ if not single_file_local and '-' in local_list.keys(): |
|
284 |
+ raise ParameterError("Cannot specify multiple local files if uploading from '-' (ie stdin)") |
|
287 | 285 |
elif single_file_local and local_list.keys()[0] == "-" and destination_base.endswith("/"): |
288 | 286 |
raise ParameterError("Destination S3 URI must not end with '/' when uploading from stdin.") |
289 | 287 |
elif not destination_base.endswith("/"): |