Bug 1070710
| Summary: | dnf.Base.read_comps() fails in Python3, works ok in Python2 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tim Lauridsen <tim.lauridsen> | ||||
| Component: | dnf | Assignee: | Packaging Maintenance Team <packaging-team-maint> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 20 | CC: | akozumpl, packaging-team-maint, pnemade, rholy | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | dnf-0.4.17-1.fc20 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-03-08 03:35: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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1066869 | ||||||
| Attachments: |
|
||||||
|
Description
Tim Lauridsen
2014-02-27 12:13:56 UTC
Look like a the common <str> vs <unicode> issue
def _decompress_chunked(source, dest, ztype):
..
..
while True:
try:
data = s_fn.read(1024000)
except IOError:
break
if not data: break
try:
destination.write(data)
except (OSError, IOError) as e:
msg = "Error writing to file %s: %s" % (dest, str(e))
raise dnf.exceptions.MiscError(msg)
..
data is always bytes
destination.write(data)needs unicode in python3
Hello, thank you for the report. We'll fix it. Created attachment 868667 [details]
This simple patch fixes the issue by open the output file in binary mode
Made a pull request here: https://github.com/akozumpl/dnf/pull/97 Great, thank you! fixed upstream dnf-0.4.17-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dnf-0.4.17-1.fc20 Package dnf-0.4.17-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-0.4.17-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-3465/dnf-0.4.17-1.fc20 then log in and leave karma (feedback). tested in 0.4.17 and it works fine dnf-0.4.17-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |