File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11import zeep
22
3+ { {#doc} }
34# { {doc} }
5+ { {/doc} }
46class { {class_name} }:
57 __module__ = 'skautis'
68
@@ -11,7 +13,9 @@ class {{class_name}}:
1113 self._client = zeep.Client('https://is.skaut.cz/JunakWebservice/{ {class_name} }.asmx?wsdl')
1214
1315 { {#methods} }
16+ { {#doc} }
1417 # { {doc} }
18+ { {/doc} }
1519 def { {name} }({ {def_args} }):
1620 return self._client.service.{ {name} }({ {args} })
1721
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class SkautisApi:
66 def __init__(self, appId, test=False):
77 self._appId = appId
88 self._test = test
9-
9+
1010 { {#sections} }
1111 self.{ {module} } = { {class} }(test)
1212 { {/sections} }
Original file line number Diff line number Diff line change @@ -61,9 +61,7 @@ def parse_wsdl(section_url):
6161
6262 # extract service documentation
6363 doc_tree = tree .find ('wsdl:documentation' , ns )
64- main_doc = "No documentation"
65- if doc_tree is not None :
66- main_doc = doc_tree .text
64+ main_doc = doc_tree .text if doc_tree is not None else None
6765
6866 # load interesting parts of wsdl file
6967 ports = tree .find ('wsdl:portType' , ns )
@@ -81,7 +79,7 @@ def parse_wsdl(section_url):
8179 for port in ports :
8280 # load and check port documentation
8381 doc_tag = port .find ('wsdl:documentation' , ns )
84- doc = doc_tag .text if doc_tag is not None else "No documentation"
82+ doc = doc_tag .text . strip () if doc_tag is not None else None
8583
8684 # load port name
8785 name = port .attrib ['name' ]
You can’t perform that action at this time.
0 commit comments