From c89fd19f660875e5c9cc7a7ec24c9f7e3977163e Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 16 Nov 2018 02:22:05 +0100 Subject: [PATCH] Hack broken pipe error for Python2 --- bin/load_reddit.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/load_reddit.py b/bin/load_reddit.py index 1b534bcc7..73ae0b6b5 100644 --- a/bin/load_reddit.py +++ b/bin/load_reddit.py @@ -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: