Prechádzať zdrojové kódy

msgpack version check: ignore "rc" or other version elements

Only compare the main version number, e.g. 1.1.1 (first 3 elements
of the version tuple).

Without this change, it would not accept 1.1.1rc1 because that is
not "<= (1, 1, 1)" in that simplistic version comparison.
Thomas Waldmann 1 týždeň pred
rodič
commit
467d0604da
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/borg/helpers/msgpack.py

+ 1 - 1
src/borg/helpers/msgpack.py

@@ -209,7 +209,7 @@ def is_supported_msgpack():
 
     if msgpack.version in []:  # < add bad releases here to deny list
         return False
-    return (1, 0, 3) <= msgpack.version <= (1, 1, 1)
+    return (1, 0, 3) <= msgpack.version[:3] <= (1, 1, 1)
 
 
 def get_limited_unpacker(kind):