|
@@ -56,8 +56,9 @@ def dpkg_which(cmd):
|
|
|
cmd_path = shutil.which(cmd)
|
|
|
assert cmd_path, 'cmd {!r} not found'.format(cmd)
|
|
|
matches = dpkg_search(cmd_path)
|
|
|
- assert len(matches) in [0, 1]
|
|
|
- return matches[0] if len(matches) == 1 else None
|
|
|
+ assert len(matches) != 0, '{!r} not installed via dpkg'.format(cmd_path)
|
|
|
+ assert len(matches) == 1
|
|
|
+ return matches[0]
|
|
|
|
|
|
def locate(*patterns, match_all=True, ignore_case=True):
|
|
|
params = []
|