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
(from parent 1:
37388b9
)
add BootManagerException back
author
S.Çağlar Onur
<caglar@cs.princeton.edu>
Mon, 2 Aug 2010 16:24:48 +0000
(12:24 -0400)
committer
S.Çağlar Onur
<caglar@cs.princeton.edu>
Mon, 2 Aug 2010 16:24:48 +0000
(12:24 -0400)
source/utils.py
patch
|
blob
|
history
diff --git
a/source/utils.py
b/source/utils.py
index
b6b51c8
..
fcd1ab1
100644
(file)
--- a/
source/utils.py
+++ b/
source/utils.py
@@
-139,8
+139,11
@@
def sysexec( cmd, log= None ):
raise BootManagerException, \
"Unable to create instance of subprocess.Popen " \
"for command: %s" % cmd
+ try:
+ (stdoutdata, stderrdata) = prog.communicate()
+ except KeyboardInterrupt:
+ raise BootManagerException, "Interrupted by user"
- (stdoutdata, stderrdata) = prog.communicate()
if log is not None:
log.write(stdoutdata)