Skip to content

Commit 0065e99

Browse files
authored
refactoring (#50)
* small refactoring
1 parent dc8b68c commit 0065e99

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

scripts/istsos2istsos.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def log(message):
164164
ssrv,
165165
procedure
166166
), auth=(suser, spwd), verify=False)
167-
print(res.text)
167+
168168
sdata = res.json()
169169
if sdata['success'] is False:
170170
raise Exception(

scripts/istsosutils.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def getSOSProceduresList(self):
102102
}
103103

104104
print("Requesting a getCapabilitie: %s/%s" % (self.host, self.service))
105-
print(params)
105+
# print(params)
106106

107107
res = req.get("%s/%s" % (
108108
self.host, self.service), params=params, auth=self.auth)
@@ -118,8 +118,8 @@ def getSOSProceduresList(self):
118118
procedures = {}
119119

120120
for offering in offerings:
121-
offeringName = offering.find(
122-
"{%s}name" % (gcNs['gml'])).text.split(":")[-1]
121+
# offeringName = offering.find(
122+
# "{%s}name" % (gcNs['gml'])).text.split(":")[-1]
123123

124124
# For each offering get the procedures
125125
elProcs = offering.findall("{%s}procedure" % (gcNs['sos']))
@@ -138,7 +138,6 @@ def getProcedures(self):
138138
self.host, self.service
139139
), auth=self.auth
140140
)
141-
print(res)
142141
jsonRes = res.json()
143142
if not jsonRes['success']:
144143
raise Exception(
@@ -150,8 +149,8 @@ def getProcedures(self):
150149
procedure.merge(data)
151150
procedures.append(procedure)
152151

153-
print("Procedures list result:")
154-
print(" - Found: %s procedures" % len(procedures))
152+
# print("Procedures list result:")
153+
# print(" - Found: %s procedures" % len(procedures))
155154

156155
return procedures
157156

0 commit comments

Comments
 (0)