mirror of
https://github.com/fotoente/MIsskey-ebooks-bot
synced 2025-02-16 12:28:28 +00:00
Added configparser.NoOptionError
to prevent bot from breaking if one is missing
This commit is contained in:
parent
bc9121f812
commit
fb42d536d2
1 changed files with 3 additions and 3 deletions
|
@ -71,17 +71,17 @@ def get_notes(**kwargs):
|
|||
# Read & Sanitize Inputs from Config File
|
||||
try:
|
||||
include_replies = check_str_to_bool(config.get("markov", "includeReplies"))
|
||||
except (TypeError, ValueError):
|
||||
except (TypeError, ValueError, configparser.NoOptionError):
|
||||
include_replies = True
|
||||
|
||||
try:
|
||||
include_my_renotes = check_str_to_bool(config.get("markov", "includeMyRenotes"))
|
||||
except (TypeError, ValueError):
|
||||
except (TypeError, ValueError, configparser.NoOptionError):
|
||||
include_my_renotes = False
|
||||
|
||||
try:
|
||||
exclude_nsfw = check_str_to_bool(config.get("markov", "excludeNsfw"))
|
||||
except (TypeError, ValueError):
|
||||
except (TypeError, ValueError, configparser.NoOptionError):
|
||||
exclude_nsfw = True
|
||||
|
||||
run = True
|
||||
|
|
Loading…
Add table
Reference in a new issue