From ae9668554a68606a0c77293855c8fd5a073926f6 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Thu, 5 Jan 2023 01:24:37 +0100 Subject: [PATCH] Cambiamenti per esecuzione corretta verifica online. --- loaih/build.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/loaih/build.py b/loaih/build.py index 279c3c6..8124c7a 100644 --- a/loaih/build.py +++ b/loaih/build.py @@ -119,9 +119,13 @@ class Build(loaih.RemoteBuild): # Remote storage. I have to query a remote site to know if it # was already built. name = self.appimagefilename[arch] - matching = etree.HTML(urllib.request.urlopen(str.join('/', - self.relative_path.insert(0, self.storage_path) - )).read()).xpath( + if len(self.relative_path) > 0: + path_arr = self.relative_path.insert(0, self.storage_path) + else: + path_arr = [ self.storage_path, '' ] + matching = etree.HTML(urllib.request.urlopen( + str.join('/', path_arr) + ).read()).xpath( f"//a[contains(@href, '{name}')/@href" )