git://git.onelab.eu
/
bootmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handle shell redirects
[bootmanager.git]
/
source
/
utils.py
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:
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 " \
except OSError:
raise BootManagerException, \
"Unable to create instance of subprocess.Popen " \