[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/develop] Fix UnicodeDecodeErrors from unittests for bridgedb.persistent.



commit 1a8fb997ad2a61df32cd633e727401a7fea85d03
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sun Feb 9 00:35:05 2014 +0000

    Fix UnicodeDecodeErrors from unittests for bridgedb.persistent.
---
 lib/bridgedb/persistent.py |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/bridgedb/persistent.py b/lib/bridgedb/persistent.py
index 311240a..84260f6 100644
--- a/lib/bridgedb/persistent.py
+++ b/lib/bridgedb/persistent.py
@@ -252,12 +252,16 @@ class State(jelly.Jellyable):
                 if value != self.config.__dict__[key]:
                     setattr(self, key, value)
                     updated.append(key)
-                    logging.debug("Updated %s setting: %r â?? %r"
-                                  % (key, self.config.__dict__[key], value))
+                    logging.debug("Updated %s setting: %r â?? %r" %
+                                  (key.decode('ascii', 'replace'),
+                                   self.config.__dict__[key],
+                                   value))
             except (KeyError, AttributeError):
                 setattr(self, key, value)
                 new.append(key)
-                logging.debug("New setting: %s = %r" % (key, value))
+                logging.debug("New setting: %s = %r" %
+                              (key.decode('ascii', 'replace'),
+                               value))
 
         logging.info("Updated setting(s): %s" % ' '.join([x for x in updated]))
         logging.info("New setting(s): %s" % ' '.join([x for x in new]))



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits