diff --git a/centos2anolis.py b/centos2anolis.py index 564a66035fd12ad511436c3bb8218842baace3fd..7768ca8a19018a90dda23047a537a1af0ad58192 100644 --- a/centos2anolis.py +++ b/centos2anolis.py @@ -64,7 +64,7 @@ python-oauth sl-logos yum-rhn-plugin centos-indexhtml' reposdir ='' anolislist7 = ['7.7','7.9'] -anolislist8 = ['8.2','8.4'] +anolislist8 = ['8.2','8.4','8'] try: centosv = str(subprocess.check_output("cat /etc/centos-release | awk '{print $4}'", shell=True), 'utf-8')[:3] print("CentOS version is " + centosv) @@ -234,6 +234,8 @@ def check_version(version): elif centosversion >= 8 and version == "8.4": print("You selected Anolis OS 8.4") repostr_an8 = re.sub(r"/(8)/", "/8.4/", repostr_an8) + elif centosversion >= 8 and version == "8": + print("You selected Latest Anolis OS 8.") else: print("version " + version + " not found, Please Check!") sys.exit(1) @@ -249,6 +251,8 @@ def check_version(version): elif centosversion >= 8 and version == "8.4": print("You selected Anolis OS 8.4") repostr_an8 = re.sub(r"/(8)/", "/8.4/", repostr_an8) + elif centosversion >= 8 and version == "8": + print("You selected Latest Anolis OS 8.") else: print("version " + version + " not found,Please Check!") print("The following version are enabled")