]> www.vanbest.org Git - motioneye-debian/commitdiff
versions containing lowercase "git" are now also considered new
authorCalin Crisan <ccrisan@gmail.com>
Sun, 18 Oct 2015 14:57:36 +0000 (17:57 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 18 Oct 2015 14:57:36 +0000 (17:57 +0300)
motioneye/config.py

index e81d359942803e24c5f2b8a4a83e4c42f5aba203..45e767d0fd25da4c2b03c590e30bb3d98efecbe6 100644 (file)
@@ -1346,14 +1346,14 @@ def is_old_motion():
     try:
         binary, version = motionctl.find_motion()  # @UnusedVariable
         
-        if version.startswith('trunkREV'): # e.g. trunkREV599
+        if version.startswith('trunkREV'): # e.g. "trunkREV599"
             version = int(version[8:])
             return version <= _LAST_OLD_CONFIG_VERSIONS[0]
         
-        elif version.count('Git'): # e.g. Unofficial-Git-a5b5f13
+        elif version.lower().count('git'): # e.g. "Unofficial-Git-a5b5f13" or "3.2.12+git20150927mrdave"
             return False # all git versions are assumed to be new
         
-        else: # stable release, should be in the format x.y.z
+        else: # stable release, should be in the format "x.y.z"
             return update.compare_versions(version, _LAST_OLD_CONFIG_VERSIONS[1]) <= 0
 
     except: