From 7ef6be4a29313eff37180ad4d82afcb68fc25a40 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 18 Oct 2015 17:57:36 +0300 Subject: [PATCH] versions containing lowercase "git" are now also considered new --- motioneye/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/motioneye/config.py b/motioneye/config.py index e81d359..45e767d 100644 --- a/motioneye/config.py +++ b/motioneye/config.py @@ -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: -- 2.39.5