sobjects/textparsers.py
changeset 4056 f4634710e20c
parent 4004 c52619c738a5
child 4252 6c4f109c2b03
--- a/sobjects/textparsers.py	Tue Dec 08 19:17:52 2009 +0100
+++ b/sobjects/textparsers.py	Tue Dec 08 19:17:57 2009 +0100
@@ -24,8 +24,8 @@
     __regid__ = 'textanalyzer'
 
     def parse(self, caller, text):
-        for parsercls in self.req.vreg['components'].get('textparser', ()):
-            parsercls(self.req).parse(caller, text)
+        for parsercls in self._cw.vreg['components'].get('textparser', ()):
+            parsercls(self._cw).parse(caller, text)
 
 
 class TextParser(Component):
@@ -53,7 +53,7 @@
     def parse(self, caller, text):
         for trname, eid in self.instr_rgx.findall(text):
             try:
-                entity = self.req.entity_from_eid(typed_eid(eid))
+                entity = self._cw.entity_from_eid(typed_eid(eid))
             except UnknownEid:
                 self.error("can't get entity with eid %s", eid)
                 continue