summaryrefslogtreecommitdiff
path: root/helpcontent2/wiki-to-help/executor.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpcontent2/wiki-to-help/executor.py')
-rw-r--r--helpcontent2/wiki-to-help/executor.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/helpcontent2/wiki-to-help/executor.py b/helpcontent2/wiki-to-help/executor.py
deleted file mode 100644
index 464ec222e4..0000000000
--- a/helpcontent2/wiki-to-help/executor.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import subprocess, os
-
-class Executor(object):
- def __init__(self,showErr=True,showOutput=True,showCmd=False):
- self.showCmd=showCmd
- if showErr: self.stderr = None
- else: self.stderr=open(os.devnull,"w")
- if showOutput: self.stdout = None
- else: self.stdout=open(os.devnull,"w")
-
- def __call__(self,*cmd):
- """
- Execute a program, e.g. Executor()("/bin/ls","/home")
- @cmd Command, args
- @return boolean True if succeed
- """
- if self.showCmd:
- print cmd
- return (subprocess.Popen(list(cmd),stderr=self.stderr,
- stdout=self.stdout).wait() == 0)
-