allow digiham binaries to return their own name
This commit is contained in:
parent
a16ad952c4
commit
9cd730dc9a
@ -231,7 +231,7 @@ class FeatureDetector(object):
|
|||||||
"""
|
"""
|
||||||
required_version = LooseVersion("0.3")
|
required_version = LooseVersion("0.3")
|
||||||
|
|
||||||
digiham_version_regex = re.compile("^digiham version (.*)$")
|
digiham_version_regex = re.compile("^(.*) version (.*)$")
|
||||||
|
|
||||||
def check_digiham_version(command):
|
def check_digiham_version(command):
|
||||||
try:
|
try:
|
||||||
@ -239,9 +239,9 @@ class FeatureDetector(object):
|
|||||||
matches = digiham_version_regex.match(process.stdout.readline().decode())
|
matches = digiham_version_regex.match(process.stdout.readline().decode())
|
||||||
if matches is None:
|
if matches is None:
|
||||||
return False
|
return False
|
||||||
version = LooseVersion(matches.group(1))
|
version = LooseVersion(matches.group(2))
|
||||||
process.wait(1)
|
process.wait(1)
|
||||||
return version >= required_version
|
return matches.group(1) in [command, "digiham"] and version >= required_version
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user