Bug 1495005

Summary: livecd-creator crashes due to missing "b" in live.py on line 497 and 581
Product: [Fedora] Fedora Reporter: upgradeservices
Component: livecd-toolsAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 26CC: adam.stokes, bcl, bruno, dhuff, extras-orphan, katzj, ngompa13, pviktori, python-sig, TicoTimo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: livecd-tools-25.0-1.fc26 livecd-tools-25.0-1.fc27 livecd-tools-25.0-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-30 16:18:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description upgradeservices 2017-09-24 19:47:49 UTC
Description of problem:

in /usr/lib/python3.6/site-packages/imgcreate/live.py
on line 497
 if kernel.startswith("kernel-") and kernel[7:] == self._default_kernel:

it should be:
 if kernel.startswith(b"kernel-") and kernel[7:] == self._default_kernel:

on line 581
elif kernel.startswith("kernel-"):

it should be:
elif kernel.startswith(b"kernel-"):

Otherwise livecd-creator will throw an error when reading current kernel version.
"TypeError: startswith first arg must be bytes or a tuple of bytes, not str"

Version-Release number of selected component (if applicable):
python3-imgcreate-24.4-1.fc26.x86_64

How reproducible:
Each time

Steps to Reproduce:
1. livecd-creator spin
2.
3.

Actual results:
Crashes with "TypeError: startswith first arg must be bytes or a tuple of bytes, not str"

Expected results:
Not crash

Additional info:
I've tested adding "b" as suggested above and the spin completed successfully, with kernel version read in correctly.

Comment 2 upgradeservices 2017-10-05 19:21:32 UTC
Thank you very much, the fix resolved the problem.

Comment 3 Fedora Update System 2017-10-21 18:49:06 UTC
livecd-tools-25.0-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-86b225030b

Comment 4 Fedora Update System 2017-10-21 18:49:54 UTC
livecd-tools-25.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-56598fe991

Comment 5 Fedora Update System 2017-10-21 18:50:45 UTC
livecd-tools-25.0-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4c20585902

Comment 6 Fedora Update System 2017-10-22 02:26:00 UTC
livecd-tools-25.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-56598fe991

Comment 7 Fedora Update System 2017-10-22 03:25:19 UTC
livecd-tools-25.0-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4c20585902

Comment 8 Fedora Update System 2017-10-23 00:50:48 UTC
livecd-tools-25.0-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-86b225030b

Comment 9 Fedora Update System 2017-10-30 16:18:30 UTC
livecd-tools-25.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-11-11 03:00:20 UTC
livecd-tools-25.0-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-11-14 08:50:14 UTC
livecd-tools-25.0-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.