]> www.vanbest.org Git - motioneye-debian/commitdiff
fixed motion binary version detection
authorCalin Crisan <ccrisan@gmail.com>
Sat, 7 Nov 2015 16:55:34 +0000 (18:55 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 7 Nov 2015 16:55:34 +0000 (18:55 +0200)
motioneye/config.py
motioneye/motionctl.py

index eb84a8cdc87dc9887cce3c8cdb7d48ecb3ca87b9..415098f4a1b7a9eb7df5a23d4c1fba7495322018 100644 (file)
@@ -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
index 79653c6ed58a866a7c732a8930985b94b5697c1f..076db2e12e974869e393ef9ec6a74048076f6c86 100644 (file)
@@ -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)