git://git.onelab.eu
/
bootmanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27c8691
)
handle shell redirects
author
S.Çağlar Onur
<caglar@cs.princeton.edu>
Fri, 27 Aug 2010 16:40:38 +0000
(12:40 -0400)
committer
S.Çağlar Onur
<caglar@cs.princeton.edu>
Fri, 27 Aug 2010 16:40:38 +0000
(12:40 -0400)
source/utils.py
patch
|
blob
|
history
diff --git
a/source/utils.py
b/source/utils.py
index
f57a0a3
..
89c63d3
100644
(file)
--- a/
source/utils.py
+++ b/
source/utils.py
@@
-134,7
+134,10
@@
def sysexec( cmd, log= None, fsck = False ):
print ("sysexec >>> %s" % cmd)
try:
- prog = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ if cmd.__contains__(">"):
+ prog = subprocess.Popen(shlex.split(cmd), shell=True)
+ else:
+ prog = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError:
raise BootManagerException, \
"Unable to create instance of subprocess.Popen " \