Skip to content

Commit

Permalink
Keep ctrl-c support for non-unix systems
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjake committed Nov 8, 2024
1 parent b59c99e commit 109c996
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internetarchive/cli/ia.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@
)
from internetarchive.cli.cli_utils import exit_on_signal

# Handle <Ctrl-C> and broken pipe
# Handle broken pipe
try:
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
signal.signal(signal.SIGINT, exit_on_signal)
except AttributeError:
# Non-unix support
pass

# Handle <Ctrl-C>
signal.signal(signal.SIGINT, exit_on_signal)


def validate_config_path(path):
"""
Expand Down

0 comments on commit 109c996

Please sign in to comment.