def __init__(self): self.args = app_args() self.rotkelchen = Rotkelchen(self.args) self.stop_event = Event() mainloop_greenlet = self.start() mainloop_greenlet.link_exception(self.handle_killed_greenlets) self.greenlets = [mainloop_greenlet] self.task_lock = Semaphore() self.task_id = 0 self.task_results = {}
return False, 'Exchange {} is not registered'.format(name) self.delete_exchange_data(name) # Success, remove it also from the DB self.data.db.remove_exchange(name) return True, '' def shutdown(self): print("Shutting Down...") self.shutdown_event.set() def set(self, *args): if len(args) < 2: return ("ERROR: set requires at least two arguments but " "got: {}".format(args)) if args[0] == 'poloniex': resp = self.poloniex.set(*args[1:]) else: return "ERROR: Unrecognized first argument: {}".format(args[0]) self.save_data() return resp # For testing purposes only if __name__ == '__main__': from args import app_args args = app_args() r = Rotkehlchen(args)