From 454019d799df210318d81dabae781ed444c5211c Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 19 Sep 2019 10:08:08 -0400 Subject: [PATCH] not len() --- sopel_modules/SpiceBot/Prerun.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sopel_modules/SpiceBot/Prerun.py b/sopel_modules/SpiceBot/Prerun.py index 943c8be..3ecb116 100644 --- a/sopel_modules/SpiceBot/Prerun.py +++ b/sopel_modules/SpiceBot/Prerun.py @@ -514,7 +514,10 @@ def trigger_hyphen_arg_handler(bot, trigger, botcom): return False elif botcom.dict["hyphen_arg"] in ['special', 'options']: - bot.osd("The special options for " + str(botcom.dict["realcom"]) + " command include: " + spicemanip(botcom.dict["dict"]["nonstockoptions"], "andlist") + ".") + if not len(botcom.dict["dict"]["nonstockoptions"]): + bot.osd("There appear to be no special options for " + str(botcom.dict["realcom"]) + ".") + else: + bot.osd("The special options for " + str(botcom.dict["realcom"]) + " command include: " + spicemanip(botcom.dict["dict"]["nonstockoptions"], "andlist") + ".") return False elif botcom.dict["hyphen_arg"] in [