Handle KeyboardInterrupt with less annoying spew to stderr.
This commit is contained in:
parent
9c349cf652
commit
3de384497d
3 changed files with 38 additions and 29 deletions
|
|
@ -8,10 +8,13 @@ if not vars.TARGET:
|
|||
err('redo-ifcreate: error: must be run from inside a .do\n')
|
||||
sys.exit(100)
|
||||
|
||||
for t in sys.argv[1:]:
|
||||
mkdirp('%s/.redo' % vars.BASE)
|
||||
if os.path.exists(t):
|
||||
err('redo-ifcreate: error: %r already exists\n' % t)
|
||||
sys.exit(1)
|
||||
else:
|
||||
add_dep(vars.TARGET, 'c', t)
|
||||
try:
|
||||
for t in sys.argv[1:]:
|
||||
mkdirp('%s/.redo' % vars.BASE)
|
||||
if os.path.exists(t):
|
||||
err('redo-ifcreate: error: %r already exists\n' % t)
|
||||
sys.exit(1)
|
||||
else:
|
||||
add_dep(vars.TARGET, 'c', t)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(200)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue