diff src/plugins/plugin_misc_radiocol.py @ 1409:3265a2639182

massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions
author souliane <souliane@mailoo.org>
date Thu, 16 Apr 2015 14:57:57 +0200
parents 069ad98b360d
children 8767c0bb7d48
line wrap: on
line diff
--- a/src/plugins/plugin_misc_radiocol.py	Thu Apr 16 13:31:14 2015 +0200
+++ b/src/plugins/plugin_misc_radiocol.py	Thu Apr 16 14:57:57 2015 +0200
@@ -136,7 +136,7 @@
         #      ==> unlink done the Q&D way with the same host trick (see above)
         radio_data = self.games[room_jid]
         if len(radio_data['players']) == 0:
-            log.debug(_('No more participants in the radiocol: cleaning data'))
+            log.debug(_(u'No more participants in the radiocol: cleaning data'))
             radio_data['queue'] = []
             for filename in radio_data['to_delete']:
                 self.deleteFile(filename, radio_data)
@@ -172,14 +172,14 @@
             try:
                 file_to_delete = radio_data['to_delete'][filename]
             except KeyError:
-                log.error(_("INTERNAL ERROR: can't find full path of the song to delete"))
+                log.error(_(u"INTERNAL ERROR: can't find full path of the song to delete"))
                 return False
         else:
             file_to_delete = filename
         try:
             unlink(file_to_delete)
         except OSError:
-            log.error(_("INTERNAL ERROR: can't find %s on the file system" % file_to_delete))
+            log.error(_(u"INTERNAL ERROR: can't find %s on the file system" % file_to_delete))
             return False
         return True
 
@@ -242,7 +242,7 @@
                     # songs in queue. We can now start the party :)
                     self.playNext(room_jid, profile)
             else:
-                log.error(_('Unmanaged game element: %s') % elt.name)
+                log.error(_(u'Unmanaged game element: %s') % elt.name)
 
     def getSyncDataForPlayer(self, room_jid, nick):
         game_data = self.games[room_jid]