Completed
Push — master ( 3bad9e...b519e1 )
by Andrii
19:09
created

idnLang.render_tag()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
1
from ..Module import Module
2
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