def quiet_exec_cmd(self, cmd, exit_code=0): print "Quiet Executing command : %s" % cmd try: return mongoctl.do_main(cmd.split(" ")[1:]) except Exception, e: print("WARNING: failed to quiet execute command '%s'. Cause: %s " % (cmd, e))
def exec_assert_cmd(self, cmd, exit_code=0): print "++++++++++ Testing command : %s" % cmd try: return mongoctl.do_main(cmd.split(" ")[1:]) except Exception, e: print("Error while executing test command '%s'. Cause: %s " % (cmd, e)) print "================= STACK TRACE ================" traceback.print_exc() print "Failing..." self.fail()