From 7c171a7e8f1c89a04c6c882ddde6cf6ed6476e95 Mon Sep 17 00:00:00 2001 From: evilhero Date: Mon, 13 Nov 2017 11:53:16 -0500 Subject: [PATCH] FIX: fix for keyfile usage with auto-snatch using correct information --- mylar/helpers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mylar/helpers.py b/mylar/helpers.py index 95ac37a9..a5e10f7b 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -2747,10 +2747,17 @@ def torrentinfo(issueid=None, torrent_hash=None, download=False, monitor=False): os.environ['host'] = mylar.CONFIG.PP_SSHHOST os.environ['port'] = mylar.CONFIG.PP_SSHPORT os.environ['user'] = mylar.CONFIG.PP_SSHUSER - os.environ['passwd'] = mylar.CONFIG.PP_SSHPASSWD os.environ['localcd'] = mylar.CONFIG.PP_SSHLOCALCD + #bash won't accept None, so send check and send empty strings for the 2 possible None values if needed if mylar.CONFIG.PP_SSHKEYFILE is not None: os.environ['keyfile'] = mylar.CONFIG.PP_SSHKEYFILE + else: + os.environ['keyfile'] = '' + if mylar.CONFIG.PP_SSHPASSWD is not None: + os.environ['passwd'] = mylar.CONFIG.PP_SSHPASSWD + else: + os.environ['passwd'] = '' + #downlocation = re.sub("\'", "\\'", downlocation) #downlocation = re.sub("&", "\&", downlocation)