We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8915591 commit b366e91Copy full SHA for b366e91
nipype/pipeline/plugins/multiproc.py
@@ -12,7 +12,6 @@
12
from multiprocessing import Process, Pool, cpu_count, pool
13
from traceback import format_exception
14
import sys
15
-from textwrap import indent
16
from logging import INFO
17
18
from copy import deepcopy
@@ -22,6 +21,16 @@
22
21
from ..engine import MapNode
23
from .base import DistributedPluginBase
24
+try:
25
+ from textwrap import indent
26
+except ImportError:
27
+ def indent(text, prefix):
28
+ """ A textwrap.indent replacement for Python < 3.3 """
29
+ if not prefix:
30
+ return text
31
+ splittext = text.splitlines(True)
32
+ return prefix + prefix.join(splittext)
33
+
34
# Init logger
35
logger = logging.getLogger('workflow')
36
0 commit comments