Skip to content

Commit

Permalink
#888: typo in argument to DotXpra, better error messages (no stacktrace)
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@10288 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 13, 2015
1 parent c579e65 commit b5f58cb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1430,12 +1430,14 @@ def guess_X11_display(socket_dir, socket_dirs):
#since we are here to shadow,
#assume we want to shadow a real X11 server,
#so remove xpra's own displays to narrow things down:
sockdir = DotXpra(socket_dir, socket_dir)
sockdir = DotXpra(socket_dir, socket_dirs)
results = sockdir.sockets()
xpra_displays = [display for _, display in results]
displays = list(set(displays)-set(xpra_displays))
assert len(displays)!=0, "could not detect any live plain X11 displays, only multiple xpra displays: %s" % ", ".join(xpra_displays)
assert len(displays)==1, "too many live X11 displays to choose from: %s" % ", ".join(displays)
if len(displays)==0:
raise InitExit(1, "could not detect any live plain X11 displays, only multiple xpra displays: %s" % ", ".join(xpra_displays))
if len(displays)!=1:
raise InitExit(1, "too many live X11 displays to choose from: %s" % ", ".join(displays))
return displays[0]

def run_proxy(error_cb, opts, script_file, args, mode, defaults):
Expand Down

0 comments on commit b5f58cb

Please sign in to comment.