No spaces in profiles
This commit is contained in:
6
bot.py
6
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
|
||||
|
||||
Reference in New Issue
Block a user