[SCM] morituri/master: * morituri/rip/debug.py: Properly write utf-8 encoded strings to stdout.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:38 UTC 2014


The following commit has been merged in the master branch:
commit 7f19859542d7e4b8aa10cf267f812dc2d51f7d0c
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Jan 22 18:55:59 2012 +0000

    	* morituri/rip/debug.py:
    	  Properly write utf-8 encoded strings to stdout.

diff --git a/ChangeLog b/ChangeLog
index 8dd834d..c17a9b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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:
 	  Actually return the result from verifyTrack.
 	  Debug the cache loading some more.  Make a note for a TODO.
diff --git a/morituri/rip/debug.py b/morituri/rip/debug.py
index c9bb5e7..82f8b2d 100644
--- a/morituri/rip/debug.py
+++ b/morituri/rip/debug.py
@@ -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"

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list