jhbuild r2493 - in trunk: . tests



Author: fpeters
Date: Sun Nov  9 23:06:23 2008
New Revision: 2493
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2493&view=rev

Log:
* tests/tests.py: add a copy of uencode(), now required by config.py.



Modified:
   trunk/ChangeLog
   trunk/tests/tests.py

Modified: trunk/tests/tests.py
==============================================================================
--- trunk/tests/tests.py	(original)
+++ trunk/tests/tests.py	Sun Nov  9 23:06:23 2008
@@ -41,13 +41,21 @@
 import jhbuild.frontends.terminal
 import jhbuild.moduleset
 
+
+def uencode(s):
+    if type(s) is unicode:
+        return s.encode(_encoding, 'replace')
+    else:
+        return s
+
 def uprint(*args):
     '''Print Unicode string encoded for the terminal'''
     for s in args[:-1]:
-        print s,
+        print uencode(s),
     s = args[-1]
-    print s
+    print uencode(s)
 __builtin__.__dict__['uprint'] = uprint
+__builtin__.__dict__['uencode'] = uencode
 
 
 import mock



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