From f5de017ef46a73dba999510d179a7537e19d2b5c Mon Sep 17 00:00:00 2001 From: licihua Date: Sun, 23 Aug 2020 17:33:14 +0800 Subject: [PATCH 1/2] fix gmp version exception --- advisors/helper/ver_rec_excpt.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/advisors/helper/ver_rec_excpt.yaml b/advisors/helper/ver_rec_excpt.yaml index fcf6f7b0..5fe4f266 100644 --- a/advisors/helper/ver_rec_excpt.yaml +++ b/advisors/helper/ver_rec_excpt.yaml @@ -23,3 +23,7 @@ sombok: shadow: - '1999' - '2000' +gmp: + - '2v0v2' + - '2v0v1' + - '2v0' -- Gitee From c1de88868982220ad9a8525570e8a5b01a3977ed Mon Sep 17 00:00:00 2001 From: licihua Date: Sun, 23 Aug 2020 17:46:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dx.y.z=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=B1=BB=E5=9E=8B=E4=B8=AD=E4=BB=85=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E4=B8=80=E4=BD=8D=E7=89=88=E6=9C=AC=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- advisors/version_recommend.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/advisors/version_recommend.py b/advisors/version_recommend.py index 49bed968..f59b589b 100755 --- a/advisors/version_recommend.py +++ b/advisors/version_recommend.py @@ -329,6 +329,8 @@ class VersionTypeXYZ(VersionType): version_candidate = [] version_digital = re.split(r'[._-]', current_version) # 将版本号做拆分 + if len(version_entry) <= 1: # 如果当前版本号仅一位,不能判断维护版本号 + return '.'.join(version_digital) xy = version_digital[0:2] for version in version_entry: version_temp = re.split(r'[._-]', version) @@ -387,6 +389,8 @@ class VersionTypeXYZ(VersionType): version_candidate.clear() for version in version_list: # 将第二位最大的列入候选列表,准备第三位比较 + if len(version) <= 1: # 过滤仅一位的版本号 + continue if y == version[1]: version_candidate.append(version) -- Gitee