Fredrik Fornwall
7 years ago
2 changed files with 27 additions and 4 deletions
@ -0,0 +1,23 @@ |
|||||
|
See https://github.com/asciinema/asciinema/issues/271 |
||||
|
|
||||
|
diff -u -r ../asciinema-2.0.1/asciinema/asciicast/v2.py ./asciinema/asciicast/v2.py
|
||||
|
--- ../asciinema-2.0.1/asciinema/asciicast/v2.py 2018-04-04 09:05:41.000000000 +0200
|
||||
|
+++ ./asciinema/asciicast/v2.py 2018-04-06 23:24:44.432657505 +0200
|
||||
|
@@ -4,7 +4,16 @@
|
||||
|
import json.decoder |
||||
|
import time |
||||
|
import codecs |
||||
|
-from multiprocessing import Process, Queue
|
||||
|
+
|
||||
|
+try:
|
||||
|
+ # Importing synchronize is to detect platforms where
|
||||
|
+ # multiprocessing does not work (python issue 3770)
|
||||
|
+ # and cause an ImportError. Otherwise it will happen
|
||||
|
+ # later when trying to use Queue().
|
||||
|
+ from multiprocessing import synchronize, Process, Queue
|
||||
|
+except ImportError:
|
||||
|
+ from threading import Thread as Process
|
||||
|
+ from queue import Queue
|
||||
|
|
||||
|
from asciinema.pty_recorder import PtyRecorder |
||||
|
|
Loading…
Reference in new issue