mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
build.lib.cmds.SSHClient: Fix dtor exception
SSHClient's destructor raises an exception because of broken os.environ syntax, fix that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
99dca58e1d
commit
f4106e9da2
1 changed files with 2 additions and 2 deletions
|
|
@ -73,10 +73,10 @@ class SSHClientCmd(SSHClient): # export
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
for key, val in self.__askpass_orig.items():
|
for key, val in self.__askpass_orig.items():
|
||||||
if key is None:
|
if val is None:
|
||||||
del os.environ[key]
|
del os.environ[key]
|
||||||
else:
|
else:
|
||||||
os.setenv(key, val)
|
os.environ[key] = val
|
||||||
if self.__askpass is not None:
|
if self.__askpass is not None:
|
||||||
os.remove(self.__askpass)
|
os.remove(self.__askpass)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue