1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Remove some no longer required things from config

This commit is contained in:
Phxntxm 2017-05-11 21:40:21 -05:00
parent f1d588688a
commit 79ed786bb6

View file

@ -10,6 +10,7 @@ global_config = {}
try:
with open("config.yml", "r") as f:
global_config = yaml.safe_load(f)
global_config = {k: v if isinstance(v, str) and len(v) != 0 else None for k, v in global_config.items()}
except FileNotFoundError:
print("You have no config file setup! Please use config.yml.sample to setup a valid config file")
quit()
@ -21,13 +22,6 @@ except KeyError:
print("Please use config.yml.sample to setup a valid config file")
quit()
try:
owner_ids = global_config["owner_id"]
except KeyError:
print("You have no owner_id saved! You're not going to be able to run certain commands without this.")
print("Please use config.yml.sample to setup a valid config file")
quit()
# This is a simple class for the cache concept, all it holds is it's own key and the values
# With a method that gets content based on it's key