From af83f5f4416cff5910cf3eac43544af007abd820 Mon Sep 17 00:00:00 2001 From: Jeffrey Townsend Date: Fri, 28 Dec 2018 16:35:29 +0000 Subject: [PATCH] Don't take an exception in the loader or installer whilst trying to be clever. --- .../all/vendor-config-onl/src/python/onl/util/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/base/all/vendor-config-onl/src/python/onl/util/__init__.py b/packages/base/all/vendor-config-onl/src/python/onl/util/__init__.py index 61652893..a146a495 100644 --- a/packages/base/all/vendor-config-onl/src/python/onl/util/__init__.py +++ b/packages/base/all/vendor-config-onl/src/python/onl/util/__init__.py @@ -150,4 +150,7 @@ def wget(url, directory=None, temp_directory=None, extension=None): return (e, None, None) def dpkg_architecture(): - return subprocess.check_output("dpkg --print-architecture", shell=True).strip() + try: + return subprocess.check_output(['/usr/bin/dpkg', '--print-architecture']).strip() + except (subprocess.CalledProcessError, OSError): + return None