def take_action(self, parsed_args): # Fix import path cwd = os.getcwd() if cwd not in sys.path and os.curdir not in sys.path: sys.path.insert(0, cwd) # Fix command line args sys.argv = parsed_args.command # Run the app if parsed_args.mode == 'remote': p = publisher.Publisher(parsed_args.socket) else: p = local.LocalPublisher(parsed_args.database) t = tracer.Tracer(p) t.run(parsed_args.command) return
def take_action(self, parsed_args): self.publisher = local.LocalPublisher(parsed_args.database) return super(Record, self).take_action(parsed_args)
def setUp(self): super(LocalTest, self).setUp() self.pub = local.LocalPublisher(':memory:') # Shutdown the thread started inside the publisher self.pub._stop()