allow ctrl+c to interrupt any subcommand

Revert "allow ctrl+c to interrupt watch-lock without printing a python stack dump"
This reverts commit bbe6d71a0a8d196bdf7a5d96f483b4df7cd3cec4.
This commit is contained in:
Josh Holtrop 2012-06-18 15:55:25 -04:00
parent c60698cd04
commit 6fd5ad2615

7
jsvn
View File

@ -576,7 +576,6 @@ def watch_lock(argv, svn, out):
break break
last_lock_owner = '' last_lock_owner = ''
try:
while True: while True:
lock_owner = '' lock_owner = ''
p = Popen([svn, 'info', path], stdout=PIPE) p = Popen([svn, 'info', path], stdout=PIPE)
@ -592,6 +591,7 @@ def watch_lock(argv, svn, out):
out.write('Locked by: %s\n' % lock_owner) out.write('Locked by: %s\n' % lock_owner)
last_lock_owner = lock_owner last_lock_owner = lock_owner
time.sleep(60) time.sleep(60)
out.write(''' out.write('''
_ _ _ _ _ _ _ _ _ _ _ _
| | | |_ __ | | ___ ___| | _____ __| | | | | | |_ __ | | ___ ___| | _____ __| | |
@ -600,8 +600,6 @@ def watch_lock(argv, svn, out):
\___/|_| |_|_|\___/ \___|_|\_\___|\__,_(_) \___/|_| |_|_|\___/ \___|_|\_\___|\__,_(_)
''') ''')
except KeyboardInterrupt:
pass
return RET_OK return RET_OK
def users(argv, svn, out): def users(argv, svn, out):
@ -1150,6 +1148,7 @@ def main(argv):
if config['svn']: if config['svn']:
realsvn = config['svn'] realsvn = config['svn']
try:
# set up execution environment for user-defined function aliases # set up execution environment for user-defined function aliases
def do(cmd, expand=True): def do(cmd, expand=True):
if type(cmd) == types.StringType: if type(cmd) == types.StringType:
@ -1160,6 +1159,8 @@ def main(argv):
config['PIPE'] = PIPE config['PIPE'] = PIPE
do_cmd(argv, realsvn, config) do_cmd(argv, realsvn, config)
except KeyboardInterrupt:
pass
return 0 return 0