Browse code

* s3cmd: make 'cfg' global

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

Michal Ludvig authored on 2008/06/27 14:23:37
Showing 2 changed files
... ...
@@ -1,5 +1,6 @@
1 1
 2008-06-27  Michal Ludvig  <michal@logix.cz>
2 2
 
3
+	* s3cmd: make 'cfg' global
3 4
 	* run-tests.sh: Sort-of testsuite
4 5
 
5 6
 2008-06-23  Michal Ludvig  <michal@logix.cz>
... ...
@@ -554,8 +554,7 @@ 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
-	cfg = Config()
558
-	s3 = S3(cfg)
557
+	s3 = S3(Config())
559 558
 
560 559
 	src_uri = S3Uri(src)
561 560
 	dst_uri = S3Uri(dst)
... ...
@@ -850,6 +849,7 @@ class MyHelpFormatter(IndentedHelpFormatter):
850 850
 			return ""
851 851
 
852 852
 def main():
853
+	global cfg
853 854
 	if float("%d.%d" %(sys.version_info[0], sys.version_info[1])) < 2.4:
854 855
 		sys.stderr.write("ERROR: Python 2.4 or higher required, sorry.\n")
855 856
 		sys.exit(1)