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__':
|
||||
import socket
|
||||
try:
|
||||
BrokenPipeError
|
||||
except NameError:
|
||||
BrokenPipeError = socket.error
|
||||
try:
|
||||
plac.call(main)
|
||||
except BrokenPipeError:
|
||||
|
|
Loading…
Reference in New Issue