- fixed looping product iHotfix
authorciesiel <ciesiel@pld-linux.org>
Thu, 3 Jun 2004 16:45:12 +0000 (16:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Zope-iHotfix-loop.patch -> 1.1

Zope-iHotfix-loop.patch [new file with mode: 0644]

diff --git a/Zope-iHotfix-loop.patch b/Zope-iHotfix-loop.patch
new file mode 100644 (file)
index 0000000..9d571f8
--- /dev/null
@@ -0,0 +1,51 @@
+diff -urN oryg/__init__.py zmien/__init__.py
+--- oryg/__init__.py   2004-02-27 17:03:24.000000000 +0100
++++ zmien/__init__.py  2004-06-03 18:30:38.000000000 +0200
+@@ -80,23 +80,33 @@
+     contexts[id] = context
+     # Publish
+-    x = Publish.old_publish(zope_request, module_name, after_list, debug)
+-
+-    # Remove the context object
+     try:
++        x = Publish.old_publish(zope_request, module_name, after_list, debug)
++    except:
+         del contexts[id]
+-    except KeyError:
+-        # Some people has reported that sometimes a KeyError exception is
+-        # raised in the previous line, I haven't been able to reproduce it.
+-        # This try/except clause seems to work. I'd prefer to understand
+-        # what is happening.
+-        LOG('iHotfix', PROBLEM,
+-            "The thread number %s don't has a context object associated." % id)
+-
+-    return x
+-
++        raise
++    else:
++        # Remove the context object
++        try:
++            del contexts[id]
++        except KeyError:
++            # Some people has reported that sometimes a KeyError exception is
++            # raised in the previous line, I haven't been able to reproduce it.
++            # This try/except clause seems to work. I'd prefer to understand
++            # what is happening.
++            LOG('iHotfix', PROBLEM,
++                "The thread %s doesn't have a context object associated." % id)
++
++        return x
++
++
++if patch is False:
++    # Intercept I18NLayer (XXX it should depend on iHotfix, contact its
++    # authors).
++    if hasattr(Publish, 'old_publish'):
++        Publish.publish = Publish.old_publish
++        del Publish.old_publish
+-if not patch:
+     # XXX What happens when Localizer 1.0 and iHotfix are installed??
+     # Apply the patch
+     Publish.old_publish = Publish.publish
This page took 0.117265 seconds and 4 git commands to generate.