src/eric7/Globals/__init__.py

branch
eric7
changeset 9747
b7976868d5b0
parent 9744
92fbd6bdba84
child 9771
4d72243909ff
--- a/src/eric7/Globals/__init__.py	Tue Feb 07 11:01:29 2023 +0100
+++ b/src/eric7/Globals/__init__.py	Tue Feb 07 18:07:12 2023 +0100
@@ -133,11 +133,15 @@
 
     @param version version string
     @type str
-    @param length desired length of the version tuple
+    @param length desired length of the version tuple (ignored)
     @type int
     @return version named tuple containing the version parts
     @rtype semver.VersionInfo
     """
+    if len(version.split(".")) < 3:
+        # ensure the version string contains at least three parts
+        version += ".0"
+
     if semver.VersionInfo.isvalid(version):
         return semver.VersionInfo.parse(version)
     else:

eric ide

mercurial