bug in fuse-s3fs

Neil Horman nhorman at redhat.com
Tue Aug 23 11:47:01 UTC 2011


On Tue, Aug 23, 2011 at 11:12:55AM +0300, Muayyad AlSadi wrote:
> is this project still active ?
> 
Yes, the project is still active.

> if not then fedora should have rpm for the other s3fs project <
> http://code.google.com/p/s3fs
> 
> if so then the following lines in the code should be fixed
Then please open a bug.

> 
> 		#Set the env correctly
> 		if self.AWS_ACCESS_KEY_ID != None:
> 			os.putenv("AWS_ACCESS_KEY_ID",self.AWS_ACCESS_KEY_ID)
> 		if self.AWS_SECRET_ACCESS_KEY != None:
> 			os.putenv("AWS_SECRET_ACCESS_KEY",
> 				self.AWS_SECRET_ACCESS_KEY)
> 
> 		if (os.environ.get("AWS_ACCESS_KEY_ID") == None):
> 			print "Need to specify AWS_ACCESS_KEY_ID"
> 		if (os.environ.get("AWS_SECRET_ACCESS_KEY") == None):
> 			print "Need to specify AWS_SECRET_ACCESS_KEY"
> 
> as python docs says < http://docs.python.org/library/os.html#os.putenv
> 
> When putenv() is supported, assignments to items in os.environ are
> automatically translated into corresponding calls to putenv();
> however, calls to putenv() don’t update os.environ, so it is actually
> preferable to assign to items of os.environ.
> 
> the code above set's env with putenv then read it with environ
> the docs says just set it with environ and it will call putenv
> 
> so it should be
> 
> 		if self.AWS_ACCESS_KEY_ID != None:
> 			os.environ["AWS_ACCESS_KEY_ID"]=self.AWS_ACCESS_KEY_ID
> 		if self.AWS_SECRET_ACCESS_KEY != None:
> 			os.environ["AWS_SECRET_ACCESS_KEY"]=self.AWS_SECRET_ACCESS_KEY
> -- 
> devel mailing list
> devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel


More information about the devel mailing list