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)
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()
# 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