Completed
Push — master ( 18d750...3bad9e )
by Andrii
11:56
created

heppy.modules.namestoreExt   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %
Metric Value
dl 0
loc 16
rs 10
wmc 3
1
from ..Module import Module
2
3
class namestoreExt(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_subProduct(self, request):
18
        self.render_extension_fields(request, 'namestoreExt', {'subProduct': {}})
19
20