From 1c38d688d561bedb4ffab481b4acfe8b519cccbe Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Sat, 8 Feb 2025 17:36:36 +0100 Subject: [PATCH] Rimozione errori linter e append mode corretto. --- src/loaih/build.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/loaih/build.py b/src/loaih/build.py index 59abfe7..ee9d45a 100644 --- a/src/loaih/build.py +++ b/src/loaih/build.py @@ -470,7 +470,7 @@ class Build(): # On the contrary, we will dump a logfile, remove the download and # redo the download. - with open(os.path.join(self.download_path, 'downloadfailure.log'), 'wa') as logfile: + with open(os.path.join(self.download_path, 'downloadfailure.log'), 'a') as logfile: logfile.write(f"{timenow.isoformat()};{resource.url};{mimetype}") os.unlink(testedfilename) @@ -647,7 +647,8 @@ class Build(): # If all works as expected, we obtain a tuple of: # (debian_packages, all_libraries, files_not_found) - (debian_packages, all_libraries, not_found) = raw + debian_packages = raw[0] + not_found = raw[2] if len(debian_packages) != 0: # Creating temporary folders @@ -773,7 +774,7 @@ class Helpers: pass2 = subprocess.Popen(shlex.split( r"grep '^\w'" ), stdin=pass1.stdout, stdout=subprocess.PIPE, encoding='utf-8') - stdout, stderr = pass2.communicate() + stdout = pass2.communicate()[0] return stdout.strip().split("\n")