Fix precedence loading of defaults

This commit is contained in:
Luke Murphy 2021-01-16 20:24:03 +01:00
parent c9dec93a4b
commit b8a7c71a0f
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 2 additions and 6 deletions

View File

@ -164,18 +164,13 @@ class Bot(ClientXMPP):
help="Nickname for the bot account",
)
self.parser.add_argument(
"-av",
"--avatar",
dest="avatar",
help="Avatar for the bot account",
default="avatar.png",
"-av", "--avatar", dest="avatar", help="Avatar for the bot account"
)
self.parser.add_argument(
"-r",
"--redis-url",
dest="redis_url",
help="Redis storage connection URL",
default="redis://localhost:6379/0",
)
self.args = self.parser.parse_args()
@ -242,6 +237,7 @@ class Bot(ClientXMPP):
self.args.avatar
or self.config.avatar
or environ.get("XBOT_AVATAR", None)
or "avatar.png"
)
redis_url = (
self.args.redis_url