From b090be4383fed132093bbb0d159ae9a06d74ca11 Mon Sep 17 00:00:00 2001 From: sepro Date: Wed, 19 Jul 2017 09:58:55 +0200 Subject: [PATCH] suppress stderr --- cluster/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster/__init__.py b/cluster/__init__.py index 48e0cac..bb8bc36 100644 --- a/cluster/__init__.py +++ b/cluster/__init__.py @@ -1,7 +1,7 @@ import re import sys -from subprocess import check_output +from subprocess import check_output, DEVNULL from time import sleep @@ -13,7 +13,7 @@ def detect_cluster_system(): :return: string "SBE", "PBS" or "other" """ try: - which_output = check_output(["which", "sge_qmaster"]).decode("utf-8") + which_output = check_output(["which", "sge_qmaster"], stderr=DEVNULL).decode("utf-8") if "/sge_qmaster" in which_output: return "SGE" @@ -21,7 +21,7 @@ def detect_cluster_system(): pass try: - which_output = check_output(["which", "pbs_sched"]).decode("utf-8") + which_output = check_output(["which", "pbs_sched"], stderr=DEVNULL).decode("utf-8") if "/pbs_sched" in which_output: return "PBS"