aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <thomas.kahle@jpberlin.de>2015-06-21 09:07:31 +0200
committerThomas Kahle <thomas.kahle@jpberlin.de>2015-06-21 09:07:31 +0200
commite47e193a1ce1d79e531f00d934af8dc1422ac8be (patch)
tree714c46388a1e6b52c806e7d2ad4c40dac20c3826 /scripts
parentMake import of urllib python2/3 compatible (diff)
downloadtatt-e47e193a1ce1d79e531f00d934af8dc1422ac8be.tar.gz
tatt-e47e193a1ce1d79e531f00d934af8dc1422ac8be.tar.bz2
tatt-e47e193a1ce1d79e531f00d934af8dc1422ac8be.zip
Fix string encoding issues for python3
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tatt5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/tatt b/scripts/tatt
index 298973b..ba83ba8 100755
--- a/scripts/tatt
+++ b/scripts/tatt
@@ -130,8 +130,9 @@ if options.bugnum:
print("Bugnumber: " + options.bugnum)
myJob.bugnumber=options.bugnum
p1 = Popen(['bugz', 'get', myJob.bugnumber, '-n'], stdout=PIPE)
- # Instead we now capture everything:
- bugraw = p1.communicate()[0]
+ # This returns a bytes encoded string, but we need standard utf-8
+ # to use a string object via its buffer API. -> decode.
+ bugraw = p1.communicate()[0].decode('utf-8')
bugtitle = [l for l in bugraw.splitlines() if 'Title' in l][0]
if re.search('KEYWORDREQ', bugraw):
# This is a keywording bug: