From 54029344f57e8544802c5bc966e98d8bc79b4c58 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 8 Oct 2017 09:42:33 +0200 Subject: [PATCH] Update to list Signed-off-by: Dimitris Zlatanidis --- slpkg/__metadata__.py | 2 +- slpkg/slack/slack_version.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 38febfc2..c6522c9d 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -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 diff --git a/slpkg/slack/slack_version.py b/slpkg/slack/slack_version.py index d47e5a7d..3ddaba6a 100644 --- a/slpkg/slack/slack_version.py +++ b/slpkg/slack/slack_version.py @@ -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