Skip to content

Commit

Permalink
Prefix one more internal function with _
Browse files Browse the repository at this point in the history
  • Loading branch information
ymattw committed Nov 14, 2024
1 parent 6afb3cb commit 1958c89
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ydiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,20 +730,20 @@ def _terminal_width():


def _trap_interrupts(entry_fn):
def entry_wrapper():
def _entry_wrapper():
signal.signal(signal.SIGINT, signal.SIG_DFL)
if sys.platform != 'win32':
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
return entry_fn()
else:
import errno
try:
return entry_fn()
except IOError as e:
if e.errno not in [errno.EPIPE, errno.EINVAL]:
raise
return 0
return entry_wrapper

import errno
try:
return entry_fn()
except IOError as e:
if e.errno not in [errno.EPIPE, errno.EINVAL]:
raise
return 0
return _entry_wrapper


@_trap_interrupts
Expand Down

0 comments on commit 1958c89

Please sign in to comment.