Skip to content

Commit

Permalink
missed from conversion to enum
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 7, 2023
1 parent e75a45a commit 7897f6b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xpra/platform/dotxpra.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_server_state(self, sockpath:str, timeout=5) -> str:
if err==errno.ENOENT:
debug("ENOENT")
return SocketState.DEAD
return self.UNKNOWN
return SocketState.UNKNOWN
finally:
try:
sock.close()
Expand Down Expand Up @@ -175,16 +175,16 @@ def get_display_state(self, display:str) -> str:
sockpath = os.path.join(session_dir, "socket")
if os.path.exists(sockpath):
state = self.is_socket_match(sockpath)
if state is self.LIVE:
if state is SocketState.LIVE:
return state
#when not using a session directory,
#add the prefix to prevent clashes on NFS:
#ie: "~/.xpra/HOSTNAME-10"
sockpath = os.path.join(d, PREFIX+strip_display_prefix(display))
state = self.is_socket_match(sockpath)
if state is self.LIVE:
if state is SocketState.LIVE:
return state
return state or self.DEAD
return state or SocketState.DEAD

#find the matching sockets, and return:
#(state, local_display, sockpath) for each socket directory we probe
Expand Down

0 comments on commit 7897f6b

Please sign in to comment.