Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / bin / update / config.py
blob0bc60a07f53bec11dd0f7a511a111d813fa34350
2 import configparser
3 import os
5 class Config(object):
7 def __init__(self):
8 self.certificate_path = None
9 self.certificate_name = None
10 self.channel = None
11 self.base_url = None
12 self.upload_url = None
13 self.server_url = None
15 def parse_config(config_file):
16 config = configparser.ConfigParser()
17 config.read(os.path.expanduser(config_file))
19 data = Config()
20 updater_data = config['Updater']
21 data.base_url = updater_data['base-url']
22 data.certificate_name = updater_data['certificate-name']
23 data.certificate_path = updater_data['certificate-path']
24 data.channel = updater_data['channel']
25 data.upload_url = updater_data['upload-url']
26 data.server_url = updater_data["ServerURL"]
28 return data