Browse code

s3cmd get to stdout: set file_exists to avoid traceback, bug #175

Fixes https://github.com/s3tools/s3cmd/issues/175
Reported by Seth Noble.

Set file_exists so we don't try to delete sys.stdout if getting the
file happens to fail.

Matt Domsch authored on 2013/05/25 10:59:15
Showing 1 changed files
... ...
@@ -446,6 +446,7 @@ def cmd_object_get(args):
446 446
         if destination == "-":
447 447
             ## stdout
448 448
             dst_stream = sys.__stdout__
449
+            file_exists = True
449 450
         else:
450 451
             ## File
451 452
             try: