1 import variables as var
4 def strings(option, *argv, **kwargs):
6 string = var.config.get("strings", option)
8 raise KeyError("Missed strings in configuration file: '{string}'. ".format(string=option)
9 + "Please restore you configuration file back to default if necessary.")
12 formatted = string.format(*argv, **kwargs)
16 "Missed/Unexpected placeholder {{{placeholder}}} in string '{string}'. ".format(placeholder=str(e).strip("'"), string=option)
17 + "Please restore you configuration file back to default if necessary.")
20 "Missed placeholder in string '{string}'. ".format(string=option)
21 + "Please restore you configuration file back to default if necessary.")
26 def commands(command):
28 string = var.config.get("commands", command)
31 raise KeyError("Missed command in configuration file: '{string}'. ".format(string=command)
32 + "Please restore you configuration file back to default if necessary.")