Browse code

* s3cmd: Last-minute compatibility fixes for Python 2.4

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@199 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2008/06/23 14:36:16
Showing 2 changed files
... ...
@@ -11,6 +11,7 @@
11 11
 
12 12
 2008-06-23  Michal Ludvig  <michal@logix.cz>
13 13
 
14
+	* s3cmd: Last-minute compatibility fixes for Python 2.4
14 15
 	* s3cmd, s3cmd.1: --debug-exclude is an alias for --debug-syncmatch
15 16
 	* s3cmd: Don't require $HOME env variable to be set.
16 17
 	  Fixes #2000133
... ...
@@ -554,7 +554,8 @@ def cmd_sync_local2remote(src, dst):
554 554
 		for k in attrs: result += "%s:%s/" % (k, attrs[k])
555 555
 		return { 'x-amz-meta-s3cmd-attrs' : result[:-1] }
556 556
 
557
-	s3 = S3(Config())
557
+	cfg = Config()
558
+	s3 = S3(cfg)
558 559
 
559 560
 	src_uri = S3Uri(src)
560 561
 	dst_uri = S3Uri(dst)
... ...
@@ -1038,6 +1039,9 @@ if __name__ == '__main__':
1038 1038
 
1039 1039
 		main()
1040 1040
 		sys.exit(0)
1041
+	except SystemExit, e:
1042
+		sys.exit(e.code)
1043
+
1041 1044
 	except Exception, e:
1042 1045
 		sys.stderr.write("""
1043 1046
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!