File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 22
22
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
23
# SOFTWARE.
24
24
import fnmatch
25
+ import logging
25
26
import os
26
27
import re
27
28
import subprocess
37
38
DEFAULT_RESOURCE_UNITS = "MB"
38
39
LSF_JSON_OUTPUT_MIN_VERSION = "10.1.0.2"
39
40
41
+ logger = logging .getLogger (__name__ )
42
+
40
43
41
44
def find (basedir , string ):
42
45
"""
@@ -109,8 +112,9 @@ def apply_bparams(fn):
109
112
"""
110
113
cmd = ["bparams" , "-a" ]
111
114
try :
112
- output = subprocess .check_output (cmd ).decode ('utf-8' )
113
- except :
115
+ output = subprocess .check_output (cmd , stderr = subprocess .STDOUT ).decode ('utf-8' )
116
+ except subprocess .CalledProcessError as exc :
117
+ logger .debug (exc .output .decode ('utf-8' ))
114
118
return None
115
119
return fn (output .split ("\n " ))
116
120
@@ -121,8 +125,9 @@ def apply_lsadmin(fn):
121
125
"""
122
126
cmd = ["lsadmin" , "showconf" , "lim" ]
123
127
try :
124
- output = subprocess .check_output (cmd ).decode ('utf-8' )
125
- except :
128
+ output = subprocess .check_output (cmd , stderr = subprocess .STDOUT ).decode ('utf-8' )
129
+ except subprocess .CalledProcessError as exc :
130
+ logger .debug (exc .output .decode ('utf-8' ))
126
131
return None
127
132
return fn (output .split ("\n " ))
128
133
You can’t perform that action at this time.
0 commit comments