* morituri/rip/debug.py:

Properly write utf-8 encoded strings to stdout.
This commit is contained in:
Thomas Vander Stichele
2012-01-22 18:55:59 +00:00
parent ca15509e92
commit 7f19859542
2 changed files with 12 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
2012-01-22 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/rip/debug.py:
Properly write utf-8 encoded strings to stdout.
2012-01-22 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/program.py:

View File

@@ -100,13 +100,14 @@ class MusicBrainzNGS(logcommand.LogCommand):
self.stdout.write('%d releases\n' % len(metadatas))
for i, md in enumerate(metadatas):
self.stdout.write('- Release %d:\n' % (i + 1, ))
self.stdout.write(' Artist: %r\n' % md.artist)
self.stdout.write(' Title: %r\n' % md.title)
self.stdout.write(' URL: %r\n' % md.url)
self.stdout.write(' Tracks: %r\n' % len(md.tracks))
self.stdout.write(' Artist: %s\n' % md.artist.encode('utf-8'))
self.stdout.write(' Title: %s\n' % md.title.encode('utf-8'))
self.stdout.write(' URL: %s\n' % md.url)
self.stdout.write(' Tracks: %d\n' % len(md.tracks))
for j, track in enumerate(md.tracks):
self.stdout.write(' Track %2d: %r - %r\n' % (
j + 1, track.artist, track.title))
self.stdout.write(' Track %2d: %s - %s\n' % (
j + 1, track.artist.encode('utf-8'),
track.title.encode('utf-8')))
class Debug(logcommand.LogCommand):
summary = "debug internals"