Unicode traceback saving empty SourcesList regression
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Debian) |
Fix Released
|
Unknown
|
|||
python-apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Following the recent update to fix LP: #1069019 a regression was introduced when trying to save an empty SourcesList.
>>> from aptsources.
>>> s = SourcesList(
>>> s.save()
/usr/lib/
409
410 with io.open(path, "w", encoding="utf-8") as f:
--> 411 f.write(header)
412 return
413
TypeError: must be unicode, not str
This is because the header that's added when there are no APT entries is a regular Python 2 string object, and not a unicode object.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python-apt 0.9.3.3 [modified: usr/lib/
ProcVersionSign
Uname: Linux 3.13.0-18-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Mar 19 10:11:04 2014
InstallationDate: Installed on 2012-08-17 (578 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120817.1)
SourcePackage: python-apt
UpgradeStatus: Upgraded to trusty on 2014-02-08 (38 days ago)
Changed in python-apt (Debian): | |
status: | Unknown → Fix Released |
Debian have already backed out the commit for #1069019, see http:// anonscm. debian. org/gitweb/ ?p=apt/ python- apt.git; a=commitdiff; h=50a8a9d573d97 f0678721a84bcf9 fdc697e96cb0; hp=3c9e1b4fce9a 587436965c495f5 e43f96e115207