From 9cd730dc9aca5e00bf9a4a6686a7634d9ce33fea Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 28 May 2021 00:02:20 +0200 Subject: [PATCH] allow digiham binaries to return their own name --- owrx/feature.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/owrx/feature.py b/owrx/feature.py index 2344e57..8f2808b 100644 --- a/owrx/feature.py +++ b/owrx/feature.py @@ -231,7 +231,7 @@ class FeatureDetector(object): """ required_version = LooseVersion("0.3") - digiham_version_regex = re.compile("^digiham version (.*)$") + digiham_version_regex = re.compile("^(.*) version (.*)$") def check_digiham_version(command): try: @@ -239,9 +239,9 @@ class FeatureDetector(object): matches = digiham_version_regex.match(process.stdout.readline().decode()) if matches is None: return False - version = LooseVersion(matches.group(1)) + version = LooseVersion(matches.group(2)) process.wait(1) - return version >= required_version + return matches.group(1) in [command, "digiham"] and version >= required_version except FileNotFoundError: return False