Commit 89aeb765 authored by Stefan Wolfsheimer's avatar Stefan Wolfsheimer
Browse files

improved verbosity of error message

parent 5ad826a1
......@@ -207,10 +207,15 @@ def search_handle(path):
irule_input = '*path='+path
irule_output = '*existing_pid'
command = ["irule", irule_rule, irule_input, irule_output]
# execute rule to delete pid
irule_result = subprocess_popen(command)
# extract handle from search result
search_result = irule_result[0].split('=')[1].lstrip(' ')
try:
# execute rule to delete pid
irule_result = subprocess_popen(command)
# extract handle from search result
search_result = irule_result[0].split('=')[1].lstrip(' ')
except:
msg = "failed to execute command {0} or extraction result '{1}}"
print(msg.format(" ".join(command)), irule_result[0])
raise
return search_result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment