Commit c9fbe38d authored by 's avatar

Removed sys.exc_* usage

parent f85c4752
...@@ -103,7 +103,7 @@ that allows one to simply make a single web request. ...@@ -103,7 +103,7 @@ that allows one to simply make a single web request.
The module also provides a command-line interface for calling objects. The module also provides a command-line interface for calling objects.
""" """
__version__='$Revision: 1.33 $'[11:-2] __version__='$Revision: 1.34 $'[11:-2]
import sys, regex, socket, mimetools import sys, regex, socket, mimetools
from httplib import HTTP from httplib import HTTP
...@@ -219,7 +219,7 @@ class Function: ...@@ -219,7 +219,7 @@ class Function:
response =h.getfile().read() response =h.getfile().read()
except: except:
raise NotAvailable, RemoteException( raise NotAvailable, RemoteException(
NotAvailable,sys.exc_value,self.url,query) NotAvailable,sys.exc_info()[1],self.url,query)
if ec==200: return (headers,response) if ec==200: return (headers,response)
self.handleError(query, ec, em, headers, response) self.handleError(query, ec, em, headers, response)
...@@ -294,7 +294,7 @@ class Function: ...@@ -294,7 +294,7 @@ class Function:
finally: finally:
if 0: if 0:
raise NotAvailable, ( raise NotAvailable, (
RemoteException(NotAvailable,sys.exc_value, RemoteException(NotAvailable,sys.exc_info()[1],
self.url,'<MultiPart Form>')) self.url,'<MultiPart Form>'))
if ec==200: return (headers,response) if ec==200: return (headers,response)
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.32 $'[11:-2] __version__='$Revision: 1.33 $'[11:-2]
import regex, sys, os, string import regex, sys, os, string
from string import lower, atoi, rfind, split, strip, join, upper, find from string import lower, atoi, rfind, split, strip, join, upper, find
...@@ -655,7 +655,7 @@ class HTTPRequest(BaseRequest): ...@@ -655,7 +655,7 @@ class HTTPRequest(BaseRequest):
except: rsp.exception(abort=0) except: rsp.exception(abort=0)
if object is None: if object is None:
req.close() req.close()
raise rsp.errmsg, sys.exc_value raise rsp.errmsg, sys.exc_info()[1]
# The traversal machinery may return a "default object" # The traversal machinery may return a "default object"
# like an index_html document. This is not appropriate # like an index_html document. This is not appropriate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment