introduce the weather configuration

这个提交包含在:
Sven Czarnian 于 2021-09-05 19:27:47 +02:00 提交
1 父节点 d851efcd4d
当前提交 3743f31b84
1 个文件已更改
+19
+19
查看文件
@@ -0,0 +1,19 @@
#!/usr/bin/env python
import configparser;
import sys
class Weather():
def __init__(self, config : configparser.ConfigParser):
self.Provider = None
self.PortReceiver = None
self.PortNotification = None
# search the required sections
for key in config:
if 'provider' == key:
self.Provider = config['address']
if self.Provider is None:
sys.stderr.write('No weather-provider configuration found!')
sys.exit(-1)