From: Calin Crisan Date: Sat, 7 Nov 2015 16:55:34 +0000 (+0200) Subject: fixed motion binary version detection X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=95b800a169fdefb71274a1ff06262fbdc6f63344;p=motioneye-debian fixed motion binary version detection --- diff --git a/motioneye/config.py b/motioneye/config.py index eb84a8c..415098f 100644 --- a/motioneye/config.py +++ b/motioneye/config.py @@ -1370,7 +1370,7 @@ def motion_rtsp_support(): if version > _LAST_OLD_CONFIG_VERSIONS[0]: return ['tcp'] - elif version.count('Git'): # e.g. Unofficial-Git-a5b5f13 + elif version.lower().count('git'): # e.g. Unofficial-Git-a5b5f13 return ['tcp', 'udp'] # all git versions are assumed to support both transport protocols else: # stable release, should be in the format x.y.z diff --git a/motioneye/motionctl.py b/motioneye/motionctl.py index 79653c6..076db2e 100644 --- a/motioneye/motionctl.py +++ b/motioneye/motionctl.py @@ -62,7 +62,7 @@ def find_motion(): except subprocess.CalledProcessError: # not found return None - result = re.findall('^motion Version ([^,]+)', help) + result = re.findall('motion Version ([^,]+)', help, re.IGNORECASE) version = result and result[0] or '' _motion_binary_cache = (binary, version)