fix proxy and ssl default

This commit is contained in:
Morgan McMillian 2020-09-03 21:39:10 -07:00
parent 961c34e37e
commit e4231ce306
2 changed files with 7 additions and 4 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pantalaimon.thrrgilag\n" "Project-Id-Version: pantalaimon.thrrgilag\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-03 22:00+0000\n" "POT-Creation-Date: 2020-09-04 04:36+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -21,8 +21,8 @@ def load():
item['listenaddress'] = config[instance].get('listenaddress') item['listenaddress'] = config[instance].get('listenaddress')
item['listenport'] = config[instance].get('listenport') item['listenport'] = config[instance].get('listenport')
item['proxy'] = config[instance].get('proxy') item['proxy'] = config[instance].get('proxy')
item['ssl'] = config[instance].getboolean('ssl') item['ssl'] = config[instance].getboolean('ssl', True)
item['ignoreverification'] = config[instance].get('ignoreverification') item['ignoreverification'] = config[instance].getboolean('ignoreverification', True)
item['usekeyring'] = config[instance].get('usekeyring') item['usekeyring'] = config[instance].get('usekeyring')
entries.append(item) entries.append(item)
@ -40,15 +40,18 @@ def save(data):
sslval = 'true' sslval = 'true'
else: else:
sslval = 'false' sslval = 'false'
config[item['name']] = {} config[item['name']] = {}
config[item['name']]['homeserver'] = item['homeserver'] config[item['name']]['homeserver'] = item['homeserver']
config[item['name']]['listenaddress'] = "127.0.0.1" config[item['name']]['listenaddress'] = "127.0.0.1"
config[item['name']]['listenport'] = item['listenport'] config[item['name']]['listenport'] = item['listenport']
config[item['name']]['proxy'] = item['proxy']
config[item['name']]['ssl'] = sslval config[item['name']]['ssl'] = sslval
config[item['name']]['ignoreverification'] = "true" config[item['name']]['ignoreverification'] = "true"
config[item['name']]['usekeyring'] = "false" config[item['name']]['usekeyring'] = "false"
if len(item['proxy']) > 0:
config[item['name']]['proxy'] = item['proxy']
if not os.path.exists(CONFDIR): if not os.path.exists(CONFDIR):
os.makedirs(CONFDIR) os.makedirs(CONFDIR)