From 5706c25da9e139cdf070e774864e063d8d377c3a Mon Sep 17 00:00:00 2001 From: AlessandroZ Date: Fri, 30 Aug 2019 10:35:09 +0200 Subject: [PATCH] fix travis --- .../softwares/sysadmin/filezillaserver.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Windows/lazagne/softwares/sysadmin/filezillaserver.py b/Windows/lazagne/softwares/sysadmin/filezillaserver.py index 8c7b90bd..08fc941b 100644 --- a/Windows/lazagne/softwares/sysadmin/filezillaserver.py +++ b/Windows/lazagne/softwares/sysadmin/filezillaserver.py @@ -22,23 +22,21 @@ def run(self): if os.path.exists(xml_file): tree = ElementTree(file=xml_file) root = tree.getroot() + host = port = password = None for item in root.iter("Item"): if item.attrib['name'] == 'Last Server Address': - host = item.text + host = item.text elif item.attrib['name'] == 'Last Server Port': - port = item.text + port = item.text elif item.attrib['name'] == 'Last Server Password': - password = item.text + password = item.text # if all((host, port, login)) does not work if host is not None and port is not None and password is not None: - values = { + pwd_found = [{ 'Host': host, 'Port': port, 'Password': password, - } + }] - if values: - pwd_found.append(values) - - return pwd_found \ No newline at end of file + return pwd_found