Skip to content

Commit

Permalink
Initialise base class *after* extending template
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Easterbrook <jim@jim-easterbrook.me.uk>
  • Loading branch information
jim-easterbrook committed Aug 28, 2018
1 parent 3b0b49d commit b22a84b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pywws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '18.8.0'
_release = '1599'
_commit = '5ccda32'
_release = '1600'
_commit = '3b0b49d'
2 changes: 1 addition & 1 deletion src/pywws/service/pwsweather.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ class ToService(pywws.service.CatchupDataService):
"""

def __init__(self, context, check_params=True):
super(ToService, self).__init__(context, check_params)
# extend template
if context.params.get('config', 'ws type') == '3080':
self.template += """
#illuminance "'solarradiation': '%.2f'," "" "illuminance_wm2(x)"#
#uv "'UV' : '%d',"#
"""
super(ToService, self).__init__(context, check_params)

@contextmanager
def session(self):
Expand Down
2 changes: 1 addition & 1 deletion src/pywws/service/underground.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class ToService(pywws.service.CatchupDataService):
"""

def __init__(self, context, check_params=True):
super(ToService, self).__init__(context, check_params)
# extend template
if context.params.get('config', 'ws type') == '3080':
self.template += """
Expand All @@ -103,6 +102,7 @@ def __init__(self, context, check_params=True):
#hum_in "'indoorhumidity': '%.d',"#
#temp_in "'indoortempf' : '%.1f'," "" "temp_f(x)"#
"""
super(ToService, self).__init__(context, check_params)

@contextmanager
def session(self):
Expand Down
2 changes: 1 addition & 1 deletion src/pywws/service/wetterarchivde.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ class ToService(pywws.service.CatchupDataService):
"""

def __init__(self, context, check_params=True):
super(ToService, self).__init__(context, check_params)
# extend template
if context.params.get('config', 'ws type') == '3080':
self.template += """#uv "'uv': '%d',"#"""
super(ToService, self).__init__(context, check_params)

@contextmanager
def session(self):
Expand Down

0 comments on commit b22a84b

Please sign in to comment.