[Opensrf-commits] r1141 - trunk/src/python/osrf
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 21 17:19:25 EST 2007
Author: erickson
Date: 2007-11-21 17:01:42 -0500 (Wed, 21 Nov 2007)
New Revision: 1141
Modified:
trunk/src/python/osrf/gateway.py
trunk/src/python/osrf/utils.py
Log:
replaced str() calls with unicode()
Modified: trunk/src/python/osrf/gateway.py
===================================================================
--- trunk/src/python/osrf/gateway.py 2007-11-21 20:48:50 UTC (rev 1140)
+++ trunk/src/python/osrf/gateway.py 2007-11-21 22:01:42 UTC (rev 1141)
@@ -25,7 +25,7 @@
response =urllib2.urlopen(request)
except urllib2.HTTPError, e:
# log this?
- sys.stderr.write('%s => %s?%s\n' % (str(e), self.buildURL(), params))
+ sys.stderr.write('%s => %s?%s\n' % (unicode(e), self.buildURL(), params))
raise e
return self.handleResponse(response)
@@ -95,7 +95,7 @@
try:
parser.parse(response)
except Exception, e:
- osrfLogErr('Error parsing gateway XML: %s' % str(e))
+ osrfLogErr('Error parsing gateway XML: %s' % unicode(e))
return None
return handler.getResult()
Modified: trunk/src/python/osrf/utils.py
===================================================================
--- trunk/src/python/osrf/utils.py 2007-11-21 20:48:50 UTC (rev 1140)
+++ trunk/src/python/osrf/utils.py 2007-11-21 22:01:42 UTC (rev 1141)
@@ -57,7 +57,7 @@
# If the node has no element children, clean up the text content
# and use that as the data
xmlNode = xmlNode.childNodes[0] # extract the text node
- data = re.compile('^\s*').sub('', str(xmlNode.nodeValue))
+ data = re.compile('^\s*').sub('', unicode(xmlNode.nodeValue))
data = re.compile('\s*$').sub('', data)
obj[nodeName] = data
More information about the opensrf-commits
mailing list