mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
properly pack/unpack the verison numbers into a number
This commit is contained in:
parent
4ed45d9dcc
commit
91bfa6d9fe
@ -4029,8 +4029,7 @@ def _write_regpol_data(data_to_write,
|
||||
version_nums = (version_nums[0], version_nums[1] + 1)
|
||||
elif gpt_extension.lower() == 'gPCUserExtensionNames'.lower():
|
||||
version_nums = (version_nums[0] + 1, version_nums[1])
|
||||
version_num = int("{0}{1}".format(str(version_nums[0]).zfill(4),
|
||||
str(version_nums[1]).zfill(4)), 16)
|
||||
version_num = struct.unpack('>I', struct.pack('>2H', *version_nums))[0]
|
||||
gpt_ini_data = "{0}{1}={2}\r\n{3}".format(
|
||||
gpt_ini_data[0:version_loc.start()],
|
||||
'Version', version_num,
|
||||
|
Loading…
Reference in New Issue
Block a user