api update
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 08 Dec 2009 19:17:57 +0100
changeset 4056 f4634710e20c
parent 4055 03443dfb6fa4
child 4059 f1da1a7ef29b
api update
sobjects/textparsers.py
--- 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