[open-ils-commits] r8233 - trunk/Open-ILS/src/python/oils/utils

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Dec 19 14:29:20 EST 2007


Author: erickson
Date: 2007-12-19 14:07:41 -0500 (Wed, 19 Dec 2007)
New Revision: 8233

Modified:
   trunk/Open-ILS/src/python/oils/utils/csedit.py
Log:
changed str calls to unicode, changed a var from str to s

Modified: trunk/Open-ILS/src/python/oils/utils/csedit.py
===================================================================
--- trunk/Open-ILS/src/python/oils/utils/csedit.py	2007-12-17 22:55:58 UTC (rev 8232)
+++ trunk/Open-ILS/src/python/oils/utils/csedit.py	2007-12-19 19:07:41 UTC (rev 8233)
@@ -105,7 +105,7 @@
 
         # XXX improve param logging here
 
-        self.log(log_info, "request %s %s" % (method, str(params)))
+        self.log(osrfLogInfo, "request %s %s" % (method, unicode(params)))
 
         if self.xact and self.session().state != OSRF_APP_SESSION_CONNECTED:
             self.log(log_error, "csedit lost its connection!")
@@ -118,7 +118,7 @@
             val = resp.content()
 
         except Exception, e:
-            self.log(log_error, "request error: %s" % str(e))
+            self.log(osrfLogErr, "request error: %s" % unicode(e))
             raise e
 
         return val
@@ -158,7 +158,7 @@
 
     def rawSearch(self, args):
         method = "%s.json_query.atomic" % self.app
-        self.log(log_debug, "rawSearch args: %s" % str(args))
+        self.log(osrfLogDebug, "rawSearch args: %s" % unicode(args))
         return self.request(method, [args])
 
     def rawSearch2(self, hint, fields, where, from_=None):
@@ -191,9 +191,9 @@
             type = fm['fieldmapper'].replace('::', '.')
             name = "%s_%s" % (action, fmname)
 
-            str = 'def %s(self, arg, **options):\n' % name
-            str += '\treturn self.runMethod("%s", "%s", arg, dict(options))\n' % (action, type)
-            str += 'setattr(CSEditor, "%s", %s)' % (name, name)
+            s = 'def %s(self, arg, **options):\n' % name
+            s += '\treturn self.runMethod("%s", "%s", arg, dict(options))\n' % (action, type)
+            s += 'setattr(CSEditor, "%s", %s)' % (name, name)
 
-            exec(str)
+            exec(s)
 



More information about the open-ils-commits mailing list