def parse_conf_file(): """Parses configure file 'pia.conf' using the Parser Class""" pia_section = _Parser("pia") configure_section = _Parser("configure") if getattr(pia_section, "openvpn_auto_login", None): Application.set_option(getattr(props, 'openvpn'), autologin=pia_section.openvpn_auto_login) if getattr(configure_section, "apps", None): for app in configure_section.apps: Application.set_option(getattr(props, app), configure=True) if getattr(configure_section, "hosts", None): props.hosts = configure_section.hosts