diff --git a/pym/calculate/lib/cl_template.py b/pym/calculate/lib/cl_template.py index a6e6fd3..91312b6 100644 --- a/pym/calculate/lib/cl_template.py +++ b/pym/calculate/lib/cl_template.py @@ -2540,7 +2540,10 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction, if len(versions) == 1: return list(versions.values())[0] else: - return versions[max(versions.keys(), key=getTupleVersion)] + try: + return versions[max(versions.keys(), key=getTupleVersion)] + except TypeError as e: + return "" else: return "" diff --git a/pym/calculate/lib/utils/binhosts.py b/pym/calculate/lib/utils/binhosts.py index 5a3a4fc..1d6c1dc 100644 --- a/pym/calculate/lib/utils/binhosts.py +++ b/pym/calculate/lib/utils/binhosts.py @@ -182,18 +182,13 @@ class BinhostsBase(Cachable): self.level = int(cp["update"]["level"]) #DEBUG - # if not "https://mirror.calculate-linux.org/migrate/" in self.host: - # hosts_mod_levels = { - - # "https://ftp.acc.umu.se/mirror/calculate-linux.org" : 1, - # - # } - - - # for host in hosts_mod_levels: - # if host in self.host: - # self.level = hosts_mod_levels[host] - # break + hosts_mod_levels_override = { + # "https://ftp.acc.umu.se/mirror/calculate-linux.org" : 1, + } + for host in hosts_mod_levels_override: + if host in self.host: + self.level = hosts_mod_levels_override[host] + break else: