Pass gracefully if dpkg-architecture is not installed.

This commit is contained in:
Jussi Pakkanen 2015-05-10 01:42:59 +03:00
parent 3f7f984a39
commit 28476aa719
1 changed files with 3 additions and 1 deletions

View File

@ -132,9 +132,11 @@ def version_compare(vstr1, vstr2):
return cmpop(varr1, varr2)
def default_libdir():
if os.path.isfile('/etc/debian_version'):
try:
archpath = subprocess.check_output(['dpkg-architecture', '-qDEB_HOST_MULTIARCH']).decode().strip()
return 'lib/' + archpath
except FileNotFoundError:
pass
if os.path.isdir('/usr/lib64'):
return 'lib64'
return 'lib'