diff options
| author | Josh Bell <josh@lindenlab.com> | 2008-03-14 19:54:41 +0000 | 
|---|---|---|
| committer | Josh Bell <josh@lindenlab.com> | 2008-03-14 19:54:41 +0000 | 
| commit | c0c5bdbbb90e0bcdab558ec22ea352c9d08dc078 (patch) | |
| tree | b623a9c884383ad75ed755b2c373db2b90643671 | |
| parent | 133a7b5fe2bcaaec8389b209cb5bd774ebc2ab63 (diff) | |
svn merge -r 82064:82066 svn+ssh://svn/svn/linden/qa/dev-11639-sandbox
Merge fix for DEV-11639 - fix for llsdhttp.py to work with newer eventlet API
| -rw-r--r-- | indra/lib/python/indra/ipc/llsdhttp.py | 31 | 
1 files changed, 20 insertions, 11 deletions
| diff --git a/indra/lib/python/indra/ipc/llsdhttp.py b/indra/lib/python/indra/ipc/llsdhttp.py index 0d1a1c63d6..eb9247da93 100644 --- a/indra/lib/python/indra/ipc/llsdhttp.py +++ b/indra/lib/python/indra/ipc/llsdhttp.py @@ -34,45 +34,54 @@ from indra.base import llsd  from eventlet import httpc - -get, put, delete, post = httpc.make_suite( -    llsd.format_xml, llsd.parse, 'application/xml+llsd') - +suite = httpc.HttpSuite(llsd.format_xml, llsd.parse, 'application/xml+llsd') +delete = suite.delete +delete_ = suite.delete_ +get = suite.get +get_ = suite.get_ +head = suite.head +head_ = suite.head_ +post = suite.post +post_ = suite.post_ +put = suite.put +put_ = suite.put_ +request = suite.request +request_ = suite.request_  for x in (httpc.ConnectionError, httpc.NotFound, httpc.Forbidden):      globals()[x.__name__] = x -def postFile(url, filename, verbose=False): +def postFile(url, filename):      f = open(filename)      body = f.read()      f.close()      llsd_body = llsd.parse(body) -    return post(url, llsd_body, verbose=verbose) +    return post_(url, llsd_body)  def getStatus(url, use_proxy=False): -    status, _headers, _body = get(url, use_proxy=use_proxy, verbose=True) +    status, _headers, _body = get_(url, use_proxy=use_proxy)      return status  def putStatus(url, data): -    status, _headers, _body = put(url, data, verbose=True) +    status, _headers, _body = put_(url, data)      return status  def deleteStatus(url): -    status, _headers, _body = delete(url, verbose=True) +    status, _headers, _body = delete_(url)      return status  def postStatus(url, data): -    status, _headers, _body = post(url, data, verbose=True) +    status, _headers, _body = post_(url, data)      return status  def postFileStatus(url, filename): -    status, _headers, body = postFile(url, filename, verbose=True) +    status, _headers, body = postFile(url, filename)      return status, body | 
