Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request pmaengineering#37 from joeflack4/pr_bugfix_windows…
Browse files Browse the repository at this point in the history
…-sigpipe-error

Bugfix: Windows Sigpipe issues
  • Loading branch information
jkpr authored Mar 2, 2018
2 parents 8c06b75 + a308a1d commit a2638f2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pmix/ppp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
"""
import os
from copy import copy
from signal import signal, SIGPIPE, SIG_DFL
try:
# noinspection PyUnresolvedReferences
from signal import signal, SIGPIPE, SIG_DFL
except ImportError as e:
pass
from itertools import product
from collections import OrderedDict

Expand Down Expand Up @@ -78,7 +82,11 @@ def convert_file(in_file, language=None, outpath=None, **kwargs):
try:
print(output)
except BrokenPipeError: # If output is piped.
signal(SIGPIPE, SIG_DFL)
try:
signal(SIGPIPE, SIG_DFL)
# noinspection PyBroadException
except:
pass
print(output)
except InvalidLanguageException as err:
if str(err):
Expand Down

0 comments on commit a2638f2

Please sign in to comment.