[SOLVED] Version issue
Published: October 20, 2019 - 8:30 PM
WAPT 1.7.4.6165 Enterprise
- Debian 9.9
Good morning,
I'm working on a package that will install the BIOS.
I'm conducting an audit:
I am experiencing a problem on a machine; the current BIOS version is 1.6.5.
The new version is 1.12.1
During my audit, the result is the 2nd if statement when it should be the 1st.
After checking in the console when I sort the BIOS versions in ascending order, 1.6.5 is greater than 1.12.1.
I wanted to know how to correct the problem and understand why 1.6.5 is greater than 1.12.1
I thought about adding a 0 in front of the 6 which would work but that would mean changing a lot of posts because it's not the only model to have this problem.
- Debian 9.9
Good morning,
I'm working on a package that will install the BIOS.
I'm conducting an audit:
Code: Select all
Bios = registry_readstring(HKEY_LOCAL_MACHINE, r'HARDWARE\\DESCRIPTION\\System\BIOS','BIOSVersion')
System = registry_readstring(HKEY_LOCAL_MACHINE, r'HARdWARE\\DESCRIPTION\\System\BIOS','SystemProductName')
VerBIOS = '1.12.1'
def audit():
if Bios < VerBIOS and System == "VMware Virtual Platform":
print ('BIOS a mettre a jour ')
return 'WARNING'
if Bios > VerBIOS and System == "VMware Virtual Platform":
print ('Version du package obsoléte, Package à mettre à jour')
return 'WARNING'
if Bios == VerBIOS and System == "VMware Virtual Platform":
print ('Version du BIOS a Jour')
return 'OK'
if System != "VMware Virtual Platform":
print ('Pas le bon systeme')
raise EWaptSetupException('Fatal error : %s' % (''.join("Pas le bon systeme ")))The new version is 1.12.1
During my audit, the result is the 2nd if statement when it should be the 1st.
After checking in the console when I sort the BIOS versions in ascending order, 1.6.5 is greater than 1.12.1.
I wanted to know how to correct the problem and understand why 1.6.5 is greater than 1.12.1
I thought about adding a 0 in front of the 6 which would work but that would mean changing a lot of posts because it's not the only model to have this problem.