diff --git a/document/core/util/mathjax2katex.py b/document/core/util/mathjax2katex.py index fabd082839..16abcd57e3 100755 --- a/document/core/util/mathjax2katex.py +++ b/document/core/util/mathjax2katex.py @@ -2,6 +2,7 @@ # -*- coding: latin-1 -*- import queue +import multiprocessing import os import re import shelve @@ -229,7 +230,8 @@ def Worker(): sys.stderr.write('.') q = queue.Queue() - for i in range(len(os.sched_getaffinity(0))): + for i in range(len(os.sched_getaffinity(0)) if "sched_getaffinity" in dir(os) + else multiprocessing.cpu_count()): t = threading.Thread(target=Worker) t.daemon = True t.start()