]> git.pld-linux.org Git - packages/Zope-iHotfix.git/blob - Zope-iHotfix-loop.patch
- upgraded to version 0.4.0
[packages/Zope-iHotfix.git] / Zope-iHotfix-loop.patch
1 diff -urN oryg/__init__.py zmien/__init__.py
2 --- oryg/__init__.py    2004-02-27 17:03:24.000000000 +0100
3 +++ zmien/__init__.py   2004-06-03 18:30:38.000000000 +0200
4 @@ -80,23 +80,33 @@
5      contexts[id] = context
6  
7      # Publish
8 -    x = Publish.old_publish(zope_request, module_name, after_list, debug)
9 -
10 -    # Remove the context object
11      try:
12 +        x = Publish.old_publish(zope_request, module_name, after_list, debug)
13 +    except:
14          del contexts[id]
15 -    except KeyError:
16 -        # Some people has reported that sometimes a KeyError exception is
17 -        # raised in the previous line, I haven't been able to reproduce it.
18 -        # This try/except clause seems to work. I'd prefer to understand
19 -        # what is happening.
20 -        LOG('iHotfix', PROBLEM,
21 -            "The thread number %s don't has a context object associated." % id)
22 -
23 -    return x
24 -
25 +        raise
26 +    else:
27 +        # Remove the context object
28 +        try:
29 +            del contexts[id]
30 +        except KeyError:
31 +            # Some people has reported that sometimes a KeyError exception is
32 +            # raised in the previous line, I haven't been able to reproduce it.
33 +            # This try/except clause seems to work. I'd prefer to understand
34 +            # what is happening.
35 +            LOG('iHotfix', PROBLEM,
36 +                "The thread %s doesn't have a context object associated." % id)
37 +
38 +        return x
39 +
40 +
41 +if patch is False:
42 +    # Intercept I18NLayer (XXX it should depend on iHotfix, contact its
43 +    # authors).
44 +    if hasattr(Publish, 'old_publish'):
45 +        Publish.publish = Publish.old_publish
46 +        del Publish.old_publish
47  
48 -if not patch:
49      # XXX What happens when Localizer 1.0 and iHotfix are installed??
50      # Apply the patch
51      Publish.old_publish = Publish.publish
This page took 0.100909 seconds and 3 git commands to generate.