Skip to content

Commit ae247c5

Browse files
committed
Fix cases where out/err of condor_ce_trace or condor_ce_q are None
1 parent 3e994a5 commit ae247c5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

osgtest/tests/test_550_condorce.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,21 @@ def run_trace(self, *args):
4848
cwd = os.getcwd()
4949
os.chdir('/tmp')
5050
self.command += ['condor_ce_trace', '--debug'] + list(args) + [core.get_hostname()]
51-
trace_rc, stdout, stderr = core.system(self.command, user=True)
51+
trace_rc, trace_out, trace_err = core.system(self.command, user=True)
5252
os.chdir(cwd)
5353

5454
if trace_rc:
5555
msg = 'condor_ce_trace failed'
56-
if stdout.find(', was held'):
56+
if trace_out.find(', was held'):
5757
msg = 'condor_ce_trace job held'
5858
_, hold_out, hold_err = core.system(('condor_ce_q', '-held'))
59-
stdout += hold_out
60-
stderr += hold_err
61-
self.fail(core.diagnose(msg, self.command, trace_rc, stdout, stderr))
59+
self.fail(core.diagnose(msg,
60+
self.command,
61+
trace_rc,
62+
str(trace_out) + str(hold_out),
63+
str(trace_err) + str(hold_err)))
6264

63-
return stdout, stderr
65+
return trace_out, trace_err
6466

6567
def run_blahp_trace(self, lrms):
6668
"""Run condor_ce_trace() against a non-HTCondor backend and verify the cache"""

0 commit comments

Comments
 (0)