Skip to content

Commit d948e16

Browse files
committed
windows-related fix
1 parent 9e31a46 commit d948e16

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gitless/cli/helpers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ def get_branch_or_use_upstream(branch_name, arg, repo):
7070

7171
def page(fp, repo):
7272
if not sys.stdout.isatty(): # we are being piped or redirected
73-
# Prevent Python from throwing exceptions on SIGPIPE
74-
from signal import signal, SIGPIPE, SIG_DFL
75-
signal(SIGPIPE, SIG_DFL)
73+
if sys.platform != 'win32':
74+
# Prevent Python from throwing exceptions on SIGPIPE
75+
from signal import signal, SIGPIPE, SIG_DFL
76+
signal(SIGPIPE, SIG_DFL)
7677
# memory-friendly way to output contents of file to stdout
7778
with open(fp, 'r') as f:
7879
shutil.copyfileobj(f, sys.stdout)

0 commit comments

Comments
 (0)