[Bug 1294531] Re: Unicode traceback saving empty SourcesList regression
Adam Collard
adam.collard at canonical.com
Fri Mar 21 08:39:48 UTC 2014
python-apt (0.9.3.4) fixed this in Trusty.
Confirmed that it's no longer reproducible.
** Bug watch added: Debian Bug tracker #742118
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742118
** Also affects: python-apt (Debian) via
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742118
Importance: Unknown
Status: Unknown
** Changed in: python-apt (Ubuntu)
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1294531
Title:
Unicode traceback saving empty SourcesList regression
Status in “python-apt” package in Ubuntu:
Fix Released
Status in “python-apt” package in Debian:
Unknown
Bug description:
Following the recent update to fix LP: #1069019 a regression was
introduced when trying to save an empty SourcesList.
>>> from aptsources.sourceslist import SourcesList
>>> s = SourcesList(withMatcher=False)
>>> s.save()
/usr/lib/python2.7/dist-packages/aptsources/sourceslist.pyc in save(self)
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/python2.7/dist-packages/aptsources/sourceslist.py]
ProcVersionSignature: Ubuntu 3.13.0-18.38-generic 3.13.6
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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1294531/+subscriptions
More information about the foundations-bugs
mailing list