Skip to content

Commit 96c6101

Browse files
committed
Small change
Signed-off-by: Jakub Stejskal <[email protected]>
1 parent 4b29cb9 commit 96c6101

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

Diff for: osia/installer/downloader/install.py

+16-19
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,30 @@ def get_url(directory: str, arch: str) -> Tuple[Optional[str], Optional[str]]:
5757
"""Searches the http directory and returns both url to installer
5858
and version.
5959
"""
60-
logging.info('Url to find %s', directory)
61-
logging.info('Arch %s', arch)
60+
logging.debug('Url for installers look-up %s', directory)
6261
lst = requests.get(directory, allow_redirects=True)
6362
tree = BeautifulSoup(lst.content, 'html.parser')
6463
links = tree.find_all('a')
65-
logging.info('Links %s', links)
6664
installer, version = None, None
6765
os_name, local_arch = _current_platform()
6866
for k in links:
69-
logging.info('Parsing link: %s', k.get('href'))
67+
logging.debug('Parsing link: %s', k.get('href'))
7068
match = VERSION_RE.match(k.get('href'))
7169
if match and match.group('platform') == os_name:
72-
logging.info('Platform matched: ' + os_name)
73-
if arch == "amd64":
74-
logging.info('Arch: amd64')
75-
if match.group('architecture') is None:
76-
logging.info('architecture is none')
77-
installer = lst.url + k.get('href')
78-
version = match.group('version')
79-
break
80-
else:
81-
if (local_arch == match.group('architecture')) \
82-
or (local_arch == arch and not match.group('architecture')):
83-
logging.info('Second part of it')
84-
installer = lst.url + k.get('href')
85-
version = match.group('version')
86-
break
70+
# if arch == "amd64":
71+
# logging.info('Arch: amd64')
72+
# if match.group('architecture') is None:
73+
# logging.info('architecture is none')
74+
# installer = lst.url + k.get('href')
75+
# version = match.group('version')
76+
# break
77+
# else:
78+
if (local_arch == match.group('architecture')) \
79+
or (local_arch == arch and not match.group('architecture')):
80+
logging.info('Second part of it')
81+
installer = lst.url + k.get('href')
82+
version = match.group('version')
83+
break
8784
return installer, version
8885

8986

0 commit comments

Comments
 (0)