def __init__(self, context): self.context = context if self.context.debug: print("init command debug") try: value = Default.get_debug() except: Default.set_debug("off")
def do_debug(self, args, arguments): """ :: Usage: debug on debug off debug list switches on and off the debug messages """ if arguments["on"]: Default.set_debug("on") Console.ok("Switch debug on") elif arguments["off"]: Default.set_debug("off") Console.ok("Switch debug off") elif arguments["list"]: debug = Default.debug() Console.ok("Debug is switched {}".format(debug)) return ""