Total Complexity | 3 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | from ..Module import Module |
||
3 | class idnLang(Module): |
||
4 | opmap = { |
||
5 | 'nsExtErrData': 'descend', |
||
6 | } |
||
7 | |||
8 | ### RESPONSE parsing |
||
9 | |||
10 | def parse_msg(self, response, tag): |
||
11 | if 'code' in tag.attrib: |
||
12 | response.set('nsExtErr.code', tag.attrib['code']) |
||
13 | response.set('nsExtErr.msg', tag.text) |
||
14 | |||
15 | ### REQUEST rendering |
||
16 | |||
17 | def render_tag(self, request): |
||
18 | extension = self.render_extension(request, 'tag') |
||
19 | extension.text = request.get('idnLang:tag') |
||
20 | |||
21 |