Skip to content

Commit

Permalink
app: SIGWINCH is not available on windows
Browse files Browse the repository at this point in the history
Also clarify why this magic is needed
  • Loading branch information
László Vaskó committed Sep 11, 2019
1 parent 9a9ab90 commit f3fd7e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openconnect_sso/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ async def select_profile(profile_list):
values=[(p, p.name) for i, p in enumerate(profile_list)],
async_=True,
).to_asyncio_future()
asyncio.get_event_loop().remove_signal_handler(signal.SIGWINCH)
# Somehow prompt_toolkit sets up a bogus signal handler upon exit
# TODO: Report this issue upstream
if hasattr(signal, "SIGWINCH"):
asyncio.get_event_loop().remove_signal_handler(signal.SIGWINCH)
if not selection:
return selection
logger.info("Selected profile", profile=selection.name)
Expand Down

0 comments on commit f3fd7e3

Please sign in to comment.