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/"
# computer architecture
if comp_arch == "off" or comp_arch == "OFF":
if comp_arch in ["off", "OFF"]:
arch = os.uname()[4]
else:
arch = comp_arch

View file

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