changeset 1449:7e63fdb272e5

misc: don't take post version into account when comparing versions
author Goffi <goffi@goffi.org>
date Mon, 02 Aug 2021 22:05:37 +0200
parents 1f66a363f1a0
children f18767efabcc
files twisted/plugins/libervia_server.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/twisted/plugins/libervia_server.py	Fri Jun 25 11:29:52 2021 +0200
+++ b/twisted/plugins/libervia_server.py	Mon Aug 02 22:05:37 2021 +0200
@@ -31,6 +31,7 @@
     except ImportError:
         pass
 
+import re
 import os.path
 import libervia
 import sat
@@ -48,7 +49,9 @@
 import configparser
 
 
-if libervia.__version__ != sat.__version__:
+RE_VER_POST = re.compile(r"\.post[0-9]+")
+
+if RE_VER_POST.sub("", libervia.__version__) != RE_VER_POST.sub("", sat.__version__):
     import sys
 
     sys.stderr.write(