From cc29d6d4c47cc016ad921450d601d44364243c83 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Mon, 17 Jun 2019 14:50:24 -0400 Subject: [PATCH] basename --- sopel_modules/SpiceBot/Tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sopel_modules/SpiceBot/Tools.py b/sopel_modules/SpiceBot/Tools.py index f83f579..ef61bee 100644 --- a/sopel_modules/SpiceBot/Tools.py +++ b/sopel_modules/SpiceBot/Tools.py @@ -356,7 +356,8 @@ def read_directory_json_to_dict(directories, configtypename="Config File", log_f filecount += 1 slashsplit = str(filepath).split("/") filename = slashsplit[-1] - configs_dict[filename] = dict_from_file + filename_base = os.path.basename(filename).rsplit('.', 1)[0] + configs_dict[filename_base] = dict_from_file else: fileopenfail += 1