Update to list

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2017-10-08 09:42:33 +02:00
parent eb5d09d962
commit 54029344f5
2 changed files with 3 additions and 4 deletions

View file

@ -240,7 +240,7 @@ class MetaData(object):
slackpkg_lib_path = "/var/lib/slackpkg/" slackpkg_lib_path = "/var/lib/slackpkg/"
# computer architecture # computer architecture
if comp_arch == "off" or comp_arch == "OFF": if comp_arch in ["off", "OFF"]:
arch = os.uname()[4] arch = os.uname()[4]
else: else:
arch = comp_arch arch = comp_arch

View file

@ -33,8 +33,7 @@ def slack_ver():
Open file and read Slackware version Open file and read Slackware version
""" """
slackware_version = _meta_.slackware_version if _meta_.slackware_version in ["off", "OFF"]:
if slackware_version == "off" or slackware_version == "OFF":
sv = Utils().read_file("/etc/slackware-version") sv = Utils().read_file("/etc/slackware-version")
version = re.findall(r"\d+", sv) version = re.findall(r"\d+", sv)
if len(sv) > 2: if len(sv) > 2:
@ -42,4 +41,4 @@ def slack_ver():
else: else:
return (".".join(version)) return (".".join(version))
else: else:
return slackware_version return _meta_.slackware_version