Skip to content

Commit

Permalink
don't log a stacktrace if we get a ctrl-C during early setup (ie: con…
Browse files Browse the repository at this point in the history
…nection setup), just exit

git-svn-id: https://xpra.org/svn/Xpra/trunk@3910 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 21, 2013
1 parent d74bd6f commit 3c792d7
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,26 +422,30 @@ def sigusr2(*args):
signal.signal(signal.SIGUSR1, sigusr1)
signal.signal(signal.SIGUSR2, sigusr2)

if mode=="start" and len(args)>0 and (args[0].startswith("ssh/") or args[0].startswith("ssh:")):
#ie: "xpra start ssh:HOST:DISPLAY --start-child=xterm"
return run_remote_server(parser, options, args)
elif (mode in ("start", "upgrade") and supports_server) or (mode=="shadow" and supports_shadow):
nox()
from xpra.scripts.server import run_server
return run_server(parser, options, mode, script_file, args)
elif mode in ("attach", "detach", "screenshot", "version", "info"):
return run_client(parser, options, args, mode)
elif mode == "stop" and (supports_server or supports_shadow):
nox()
return run_stop(parser, options, args)
elif mode == "list" and (supports_server or supports_shadow):
return run_list(parser, options, args)
elif mode in ("_proxy", "_proxy_start") and (supports_server or supports_shadow):
nox()
return run_proxy(parser, options, script_file, args, mode=="_proxy_start")
else:
parser.error("invalid mode '%s'" % mode)
return 1
try:
if mode=="start" and len(args)>0 and (args[0].startswith("ssh/") or args[0].startswith("ssh:")):
#ie: "xpra start ssh:HOST:DISPLAY --start-child=xterm"
return run_remote_server(parser, options, args)
elif (mode in ("start", "upgrade") and supports_server) or (mode=="shadow" and supports_shadow):
nox()
from xpra.scripts.server import run_server
return run_server(parser, options, mode, script_file, args)
elif mode in ("attach", "detach", "screenshot", "version", "info"):
return run_client(parser, options, args, mode)
elif mode == "stop" and (supports_server or supports_shadow):
nox()
return run_stop(parser, options, args)
elif mode == "list" and (supports_server or supports_shadow):
return run_list(parser, options, args)
elif mode in ("_proxy", "_proxy_start") and (supports_server or supports_shadow):
nox()
return run_proxy(parser, options, script_file, args, mode=="_proxy_start")
else:
parser.error("invalid mode '%s'" % mode)
return 1
except KeyboardInterrupt, e:
sys.stderr.write("\ncaught %s, exiting\n" % repr(e))
return 128+signal.SIGINT


def parse_display_name(error_cb, opts, display_name):
Expand Down

0 comments on commit 3c792d7

Please sign in to comment.