Skip to content

Commit ae2a81f

Browse files
author
arch
committed
update installer
1 parent 0f8c3ca commit ae2a81f

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

contrib/Installer/mtfg-ofs-extension-installer.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,6 @@ def is_ofs_installed():
6868
error("OFS is not installed. Please download and install OFS. Befor running this installer open OFS once!")
6969

7070

71-
def get_download_urls():
72-
# sometimes requests failed to fetch the url so we try up to 3 times
73-
for i in range(3):
74-
try:
75-
html_text = requests.get(FUNSCRIPT_GENERATOR_RELEASE_URL).text
76-
download_urls = { version.parse(re.search(r'v[^/]*', x).group().lower().replace("v", "")) : "https://github.com" + x \
77-
for x in [link.get('href') for link in BeautifulSoup(html_text, 'html.parser').find_all('a') \
78-
if link.get('href').endswith(".zip") and "/releases/" in link.get('href')]
79-
}
80-
latest = max(download_urls)
81-
return download_urls, latest, ""
82-
except:
83-
time.sleep(2)
84-
if i == 2:
85-
error("Download URL not found (" + FUNSCRIPT_GENERATOR_RELEASE_URL + ")")
86-
87-
8871
def get_download_urls_with_api():
8972
# sometimes requests failed to fetch the url so we try up to 3 times
9073
for i in range(3):
@@ -148,9 +131,9 @@ def update(download_urls, latest, release_notes):
148131
is_latest_version_installed(version_file, latest)
149132

150133
print('New Version is available')
151-
print('')
152-
print('Release notes:')
153-
print(release_notes)
134+
# print('')
135+
# print('Release notes:')
136+
# print(release_notes)
154137

155138
trial = 0
156139
while True:

0 commit comments

Comments
 (0)