Skip to content
Snippets Groups Projects
Commit cf524075 authored by Andreas Plach's avatar Andreas Plach
Browse files

adding script to delete all ectrans jobs (shown with ecaccess-ectrans-list)

parent 0e407910
Branches
No related tags found
No related merge requests found
from subprocess import check_output, run
# write output of ecaccess-ectrans-list to a variable, but transfer it
# to a string (from bytes format) and split at newline
out = str(check_output(['ecaccess-ectrans-list'])).split('\\n')
for line in out:
line_tmp = line.split()
procID = line_tmp[0]
print(procID)
try:
run(['ecaccess-ectrans-delete', str(procID)])
except TypeError as e:
print(e)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment