From 5711c6cb6e3af0fc296d66be7a3e12a836dddea3 Mon Sep 17 00:00:00 2001 From: m-jishnu Date: Mon, 17 Apr 2023 18:34:26 +0530 Subject: [PATCH] minor improvement --- app/utls.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/utls.py b/app/utls.py index 580dde6..27194fb 100644 --- a/app/utls.py +++ b/app/utls.py @@ -77,6 +77,7 @@ def os_arc(): pattern = re.compile(file_name) # getting the name of the main_appx file remove_list = [] + os_arc = os_arc() for key in names_dict: matches = pattern.search(key) @@ -91,7 +92,7 @@ def os_arc(): if len(content_list) > 1: for data in content_list[1:]: - if arch not in ("neutral", os_arc()) and data[0] != arch and data[0] in ("neutral", os_arc()): + if arch not in ("neutral", os_arc) and data[0] != arch and data[0] in ("neutral", os_arc): arch = data[0] _type = data[1] ver = data[2] @@ -104,7 +105,7 @@ def os_arc(): ver = greater_ver(ver, data[2]) main_file_name = full_data[(key, arch, _type, ver)] - final_arch = os_arc() if arch == "neutral" else arch + final_arch = os_arc if arch == "neutral" else arch break # removing all the items that we have already parsed (done this way to remove runtime errors) @@ -132,7 +133,7 @@ def os_arc(): if len(content_list) > 1: for data in content_list[1:]: # checking arch is same as main file - if arch not in ("neutral", os_arc()) and data[0] != arch and data[0] in ("neutral", final_arch): + if arch not in ("neutral", final_arch) and data[0] != arch and data[0] in ("neutral", final_arch): arch = data[0] _type = data[1] ver = data[2]