bug in fuse-s3fs
Muayyad AlSadi
alsadi at gmail.com
Tue Aug 23 08:12:55 UTC 2011
is this project 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
#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
More information about the devel
mailing list