Hack broken pipe error for Python2

This commit is contained in:
Matthew Honnibal 2018-11-16 02:22:05 +01:00
parent 2874b8efd8
commit c89fd19f66
1 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,11 @@ def main(path):
if __name__ == '__main__':
import socket
try:
BrokenPipeError
except NameError:
BrokenPipeError = socket.error
try:
plac.call(main)
except BrokenPipeError: