Don't take an exception in the loader or installer whilst trying to be clever.

This commit is contained in:
Jeffrey Townsend
2018-12-28 16:35:29 +00:00
parent a620a23545
commit af83f5f441

View File

@@ -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