Decode string to bytes in dracut-regenerate
In python3, the standard out data returned by subprocess.Popen.communicate() will in most cases be bytes rather than a string and must therefore be decoded. Without this fix we hit the following error: TypeError: a bytes-like object is required, not 'str' Change-Id: I6d75f867ebfdb925970c3397175214b9050d7632 Closes-Bug: #1694463
This commit is contained in:
parent
634e9ac043
commit
aa6c1d01a9
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ def main():
|
|||
e.output = out
|
||||
raise e
|
||||
|
||||
kernel_set = out.split(':')
|
||||
kernel_set = out.decode().split(':')
|
||||
kernel_search = re.match("vmlinuz-(.*)", kernel_set[0])
|
||||
kernel_version = "%s" % kernel_search.groups(1)
|
||||
ramdisk_path = "/boot/%s" % kernel_set[1].strip()
|
||||
|
|
Loading…
Reference in a new issue