From 83c29717429dac65bca3cb5aef029db1f3ba2d28 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 27 Mar 2022 15:00:58 -0400 Subject: [PATCH] No spaces in profiles --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index a5e6430..c428758 100644 --- a/bot.py +++ b/bot.py @@ -480,7 +480,7 @@ class Bot(commands.Bot): config[str(profile_name)]['Frequency'] = self.freq config[str(profile_name)]['Mode'] = self.mode config[str(profile_name)]['Squelch'] = str(self.squelch) - config[str(profile_name)]['Noisegate Sensitivity'] = str(self.noisegate_sensitivity) + config[str(profile_name)]['Noisegate_Sensitivity'] = str(self.noisegate_sensitivity) with open('./profiles.ini', 'w+') as config_file: config.write(config_file) @@ -503,8 +503,8 @@ class Bot(commands.Bot): self.mode = config[self.profile_name]['Mode'] self.squelch = float(config[self.profile_name]['Squelch']) try: - self.noisegate_sensitivity = int(config[self.profile_name]['Noisegate Sensitivity']) - except KeyError as err: + self.noisegate_sensitivity = int(config[self.profile_name]['Noisegate_Sensitivity']) + except KeyError: print(f"Config does not contain a 'noisegate sensitivity' value, " f"creating one now with the default value: {BotResources.DEFAULT_NOISEGATE_THRESHOLD}") self.noisegate_sensitivity = BotResources.DEFAULT_NOISEGATE_THRESHOLD