mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-24 20:01:15 +00:00
Disable a code path for encoded yaml in python3
The comment says we should no longer need that. Signed-off-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
parent
18f7101847
commit
8d3d964daf
11
excuse.py
11
excuse.py
@ -15,7 +15,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
class Excuse(object):
|
||||
"""Excuse class
|
||||
@ -183,10 +183,11 @@ class Excuse(object):
|
||||
maint = self.maint
|
||||
# ugly hack to work around strange encoding in pyyaml
|
||||
# should go away with pyyaml in python 3
|
||||
try:
|
||||
maint.decode('ascii')
|
||||
except UnicodeDecodeError:
|
||||
maint = unicode(self.maint,'utf-8')
|
||||
if isinstance(maint, six.binary_type):
|
||||
try:
|
||||
maint.decode('ascii')
|
||||
except UnicodeDecodeError:
|
||||
maint = six.string_type(self.maint,'utf-8')
|
||||
res.append("Maintainer: %s" % maint)
|
||||
if self.section and self.section.find("/") > -1:
|
||||
res.append("Section: %s" % (self.section))
|
||||
|
Loading…
x
Reference in New Issue
Block a user