allow ctrl+c to interrupt any subcommand
Revert "allow ctrl+c to interrupt watch-lock without printing a python stack dump"
This reverts commit bbe6d71a0a.
This commit is contained in:
1 parent
c60698cd04
commit
6fd5ad2615
1 file changed
+4
-3
@@ -576,7 +576,6 @@ def watch_lock(argv, svn, out):
|
||||
break
|
||||
|
||||
last_lock_owner = ''
|
||||
try:
|
||||
while True:
|
||||
lock_owner = ''
|
||||
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)
|
||||
last_lock_owner = lock_owner
|
||||
time.sleep(60)
|
||||
|
||||
out.write('''
|
||||
_ _ _ _ _ _
|
||||
| | | |_ __ | | ___ ___| | _____ __| | |
|
||||
@@ -600,8 +600,6 @@ def watch_lock(argv, svn, out):
|
||||
\___/|_| |_|_|\___/ \___|_|\_\___|\__,_(_)
|
||||
|
||||
''')
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
return RET_OK
|
||||
|
||||
def users(argv, svn, out):
|
||||
@@ -1150,6 +1148,7 @@ def main(argv):
|
||||
if config['svn']:
|
||||
realsvn = config['svn']
|
||||
|
||||
try:
|
||||
# set up execution environment for user-defined function aliases
|
||||
def do(cmd, expand=True):
|
||||
if type(cmd) == types.StringType:
|
||||
@@ -1160,6 +1159,8 @@ def main(argv):
|
||||
config['PIPE'] = PIPE
|
||||
|
||||
do_cmd(argv, realsvn, config)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in new issue
Block a user