mirror of
https://github.com/weewx/weewx.git
synced 2026-06-10 18:15:16 -04:00
Made the logic which injects weewx.wxservices.StdWXCalculate into process_services a little more robust.
This commit is contained in:
8
setup.py
8
setup.py
@@ -612,8 +612,12 @@ def update_to_v3(config_dict):
|
||||
if not hasattr(service_list, '__iter__'):
|
||||
service_list = [service_list]
|
||||
config_dict['Engine']['Services'][list_name] = [this_item.replace('wxengine', 'engine') for this_item in service_list]
|
||||
if list_name == 'process_services' and 'weewx.wxservices.StdWXCalculate' not in config_dict['Engine']['Services'][list_name]:
|
||||
config_dict['Engine']['Services'][list_name].append('weewx.wxservices.StdWXCalculate')
|
||||
try:
|
||||
# Finally, make sure the new StdWXCalculate service is in the list:
|
||||
if 'weewx.wxservices.StdWXCalculate' not in config_dict['Engine']['Services']['process_services']:
|
||||
config_dict['Engine']['Services']['process_services'].append('weewx.wxservices.StdWXCalculate')
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
def save_path(filepath):
|
||||
# Sometimes the target has a trailing '/'. This will take care of it:
|
||||
|
||||
Reference in New Issue
Block a user