Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions emrg/__main__.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,7 @@

from emrg import __version__
from emrg._win import win32_no_window_kwargs
from emrg.connect import cleanup_server, connect_to_server
from emrg.connect import AuthError, cleanup_server, connect_to_server
from websockets.exceptions import ConnectionClosed


Expand DownExpand Up@@ -153,7 +153,7 @@ async def _send_shutdown() -> bool:
"""Send a graceful shutdown message to the daemon. Returns True on success."""
try:
ws = await asyncio.wait_for(connect_to_server(), timeout=3)
except (ConnectionRefusedError, FileNotFoundError, OSError, asyncio.TimeoutError):
except (ConnectionRefusedError, FileNotFoundError, OSError, asyncio.TimeoutError, AuthError):
return False

try:
Expand DownExpand Up@@ -204,7 +204,7 @@ async def _get_pid():
print("daemon stopped.")
else:
print("daemon not running (no pid from ping).")
except (ConnectionClosed, OSError, asyncio.TimeoutError, json.JSONDecodeError):
except (ConnectionClosed, OSError, asyncio.TimeoutError, json.JSONDecodeError, AuthError):
print("daemon not running.")


Expand Down
Loading