kirk_bottomley
12 years agoContributor
Is there a way to not show a failure if a process doesn't exist?
I've got a script that cleans up my folder for the next run. It can't copy files if the process is running, so I have a simple If process.exists, then process.terminate. Then it goes on to delete some files and replaces them with clean ones.
It's ok with me if the process exists or doesn't, but when I check my log, the entry shows as a failure if it couldn't shut down the process because it wasn't there.
Is there any way for the log to not register a process.exists == False as a big red X and be agnostic to the existence check?
It's ok with me if the process exists or doesn't, but when I check my log, the entry shows as a failure if it couldn't shut down the process because it wasn't there.
Is there any way for the log to not register a process.exists == False as a big red X and be agnostic to the existence check?
- You could use the Sys.Waitprocess method, it does not post errors to the log.
http://support.smartbear.com/viewarticle/31528/