Commit 7c8a588c authored by Jim Fulton's avatar Jim Fulton

Added arguments for the Retry exception so that when retrying fails,

an underlying exception can be propigated.
parent 80608074
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__="""Python Object Publisher -- Publish Python objects on web servers __doc__="""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.144 2000/04/05 00:51:37 tseaver Exp $""" $Id: Publish.py,v 1.145 2000/05/09 19:20:28 jim Exp $"""
__version__='$Revision: 1.144 $'[11:-2] __version__='$Revision: 1.145 $'[11:-2]
import sys, os import sys, os
from string import lower, atoi, rfind, strip from string import lower, atoi, rfind, strip
...@@ -98,6 +98,16 @@ class Retry(Exception): ...@@ -98,6 +98,16 @@ class Retry(Exception):
"""Raise this to retry a request """Raise this to retry a request
""" """
def __init__(self, t=None, v=None, tb=None):
self._args=t, v, tb
def reraise(self):
t, v, tb = self._args
if t is None: t=Retry
if tb is None: raise t, v
try: raise t, v, tb
finally: tb=None
def call_object(object, args, request): def call_object(object, args, request):
result=apply(object,args) # Type s<cr> to step into published object. result=apply(object,args) # Type s<cr> to step into published object.
return result return result
......
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