diff --git a/pulp/apis/__init__.py b/pulp/apis/__init__.py index 41c3240f..5133a92a 100644 --- a/pulp/apis/__init__.py +++ b/pulp/apis/__init__.py @@ -151,7 +151,7 @@ def listSolvers(onlyAvailable=False): """ result = [] for s in _all_solvers: - solver = s() + solver = s(msg=False) if (not onlyAvailable) or solver.available(): result.append(solver.name) del solver diff --git a/pulp/apis/copt_api.py b/pulp/apis/copt_api.py index 71183480..9d55e30a 100644 --- a/pulp/apis/copt_api.py +++ b/pulp/apis/copt_api.py @@ -909,10 +909,10 @@ def __init__( else: # linux and mac should have /dev/null devnull = open("/dev/null", "w") - os.dup2(devnull.fileno(), 1) + os.dup2(devnull.fileno(), sys.stdout.fileno()) self.coptenv = coptpy.Envr() self.coptmdl = self.coptenv.createModel() - os.dup2(oldstdout_fno, 1) + os.dup2(oldstdout_fno, sys.stdout.fileno()) else: self.coptenv = coptpy.Envr() self.coptmdl = self.coptenv.createModel()