Closed mbaechtold closed 11 years ago
First of all, thank you for this neat little tool.
I think I found a little bug in the read() method at https://github.com/jezdez/envdir/blob/master/envdir/__main__.py#L55 :
read()
If an environment variables is already set, envdir will not overwrite it.
That's because of os.environ.setdefault(name, value) in https://github.com/jezdez/envdir/blob/master/envdir/__main__.py#L63 not setting the value, if the key namealready exists in the os.environ dict:
os.environ.setdefault(name, value)
name
os.environ
def setdefault(self, key, failobj=None): if key not in self: self[key] = failobj return self[key]
Good catch, you're absolutely right. That's what I get for not testing it well :)
This is now released as https://pypi.python.org/pypi/envdir/0.4.1
Sweet. Thank you very much.
First of all, thank you for this neat little tool.
I think I found a little bug in the
read()
method at https://github.com/jezdez/envdir/blob/master/envdir/__main__.py#L55 :If an environment variables is already set, envdir will not overwrite it.
That's because of
os.environ.setdefault(name, value)
in https://github.com/jezdez/envdir/blob/master/envdir/__main__.py#L63 not setting the value, if the keyname
already exists in theos.environ
dict: