mirror of https://github.com/explosion/spaCy.git
Hack broken pipe error for Python2
This commit is contained in:
parent
2874b8efd8
commit
c89fd19f66
|
@ -76,6 +76,11 @@ def main(path):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
import socket
|
||||||
|
try:
|
||||||
|
BrokenPipeError
|
||||||
|
except NameError:
|
||||||
|
BrokenPipeError = socket.error
|
||||||
try:
|
try:
|
||||||
plac.call(main)
|
plac.call(main)
|
||||||
except BrokenPipeError:
|
except BrokenPipeError:
|
||||||
|
|
Loading…
Reference in New Issue