Index: trunk/extensions/XMLRC/client/rcclient.py |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | using item syntax (e.g. rc['revid']) or attribute syntax (e.g. rc.revid). |
39 | 39 | Well known attributes are converted to the appropriate type automatically. """ |
40 | 40 | |
41 | | - flags = set( ( 'anon', 'bot', 'minor', ) ) |
| 41 | + flags = set( ( 'anon', 'bot', 'minor', 'redirect', 'patrolled' ) ) |
42 | 42 | numerics = set( ( 'rcid', 'pageid', 'revid', 'old_revid', 'newlen', 'oldlen', 'ns', ) ) |
43 | 43 | times = set( ( 'timestamp', ) ) |
44 | 44 | |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | |
100 | 100 | props = ( 'rcid', 'timestamp', 'type', 'ns', 'title', 'pageid', 'revid', 'old_revid', |
101 | 101 | 'user', 'oldlen', 'newlen', 'comment', 'logid', 'logtype', 'logaction', |
102 | | - 'anon', 'bot', 'minor' ) |
| 102 | + 'anon', 'bot', 'minor', 'redirect', 'patrolled' ) |
103 | 103 | |
104 | 104 | def process(self, rc): |
105 | 105 | print "-----------------------------------------------" |
— | — | @@ -195,7 +195,10 @@ |
196 | 196 | |
197 | 197 | def dispatch_rc(self, rc): |
198 | 198 | for h in self.handlers: |
199 | | - h.process( rc ) |
| 199 | + if callable( h ): |
| 200 | + h( rc ) |
| 201 | + else: |
| 202 | + h.process( rc ) |
200 | 203 | |
201 | 204 | def add_handler(self, handler): |
202 | 205 | self.handlers.append( handler ) |