Fix configuration and allow commenting unused keys
This commit is contained in:
parent
8dcff0b2fe
commit
386b10ae15
3 changed files with 13 additions and 32 deletions
|
@ -20,4 +20,4 @@ Simone "roughnecks" Canaletti
|
|||
|
||||
Strix from Loqi
|
||||
|
||||
Slixmpp participants amf #python members who explicitly chose to remain anonymous or not to appear in this list.
|
||||
Slixmpp participants and #python members who explicitly chose to remain anonymous or not to appear in this list.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# and also from which accounts it receives instructions.
|
||||
|
||||
[XMPP]
|
||||
# JID of bot master
|
||||
operator =
|
||||
reconnect_timeout = 30
|
||||
type = client
|
||||
|
@ -12,10 +11,8 @@ type = client
|
|||
alias = Slixfeed
|
||||
jid =
|
||||
password =
|
||||
# Hostname (also address) may be an i2p or onion hostname
|
||||
hostname =
|
||||
# Port may be 5347
|
||||
port =
|
||||
#hostname =
|
||||
#port =
|
||||
|
||||
[XMPP Component]
|
||||
alias = Slixfeed
|
||||
|
@ -41,77 +38,61 @@ birthday = 21 June 2022
|
|||
# NOTE Consider not to use a version number as it might give an
|
||||
# impression of an archaic feature in the future.
|
||||
|
||||
# Example hostname 127.0.0.1
|
||||
socks5_host =
|
||||
# Example port 9050
|
||||
socks5_port =
|
||||
#socks5_host =
|
||||
#socks5_port =
|
||||
#socks5_username =
|
||||
#socks5_password =
|
||||
# NOTE Consider renaming key proxy_enabled to socks5_enabled
|
||||
# NOTE Consider removing proxy_enabled key (if you want to enable just comment)
|
||||
proxy_enabled = 1
|
||||
|
||||
[ActivityPub]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
operator =
|
||||
|
||||
[Email]
|
||||
# Not yet implemented
|
||||
recipient_emails =
|
||||
sender_emails =
|
||||
|
||||
[IMAP]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
# port = 993
|
||||
#port = 993
|
||||
|
||||
[SMTP]
|
||||
# Not yet implemented
|
||||
host =
|
||||
# port = 465
|
||||
#port = 465
|
||||
|
||||
[IRC]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
# port = 6667
|
||||
#port = 6667
|
||||
operator =
|
||||
|
||||
[LXMF]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
operator =
|
||||
|
||||
[Matrix]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
operator =
|
||||
|
||||
[Nostr]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
operator =
|
||||
|
||||
[Session]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
operator =
|
||||
|
||||
[SIP]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
operator =
|
||||
|
||||
[TOX]
|
||||
# Not yet implemented
|
||||
username =
|
||||
password =
|
||||
operator =
|
||||
|
|
|
@ -62,23 +62,23 @@ def get_value(filename, section, keys):
|
|||
if isinstance(keys, list):
|
||||
result = []
|
||||
for key in keys:
|
||||
try:
|
||||
if key in section_res:
|
||||
value = section_res[key]
|
||||
logging.debug(
|
||||
"Found value {} for key {}".format(value, key)
|
||||
)
|
||||
except:
|
||||
else:
|
||||
value = ''
|
||||
logging.error("Missing key:", key)
|
||||
logging.debug("Missing key:", key)
|
||||
result.extend([value])
|
||||
elif isinstance(keys, str):
|
||||
key = keys
|
||||
try:
|
||||
if key in section_res:
|
||||
result = section_res[key]
|
||||
logging.debug(
|
||||
"Found value {} for key {}".format(result, key)
|
||||
)
|
||||
except:
|
||||
else:
|
||||
result = ''
|
||||
# logging.error("Missing key:", key)
|
||||
if result == None:
|
||||
|
|
Loading…
Reference in a new issue