File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 13
13
from json import load , dump
14
14
import os
15
15
import shutil
16
+ import errno
16
17
from StringIO import StringIO
17
18
from warnings import warn
18
19
19
20
from ..external import portalocker
20
- from .filemanip import mkdir_p
21
21
22
22
# Get home directory in platform-agnostic way
23
23
homedir = os .path .expanduser ('~' )
56
56
interval = 1209600
57
57
""" % (homedir , os .getcwd ())
58
58
59
+
60
+ def mkdir_p (path ):
61
+ try :
62
+ os .makedirs (path )
63
+ except OSError as exc :
64
+ if exc .errno == errno .EEXIST and os .path .isdir (path ):
65
+ pass
66
+ else :
67
+ raise
68
+
69
+
59
70
class NipypeConfig (object ):
60
71
"""Base nipype config class
61
72
"""
Original file line number Diff line number Diff line change 13
13
import os
14
14
import re
15
15
import shutil
16
- import errno
17
16
18
17
import numpy as np
19
18
20
19
from ..interfaces .traits_extension import isdefined
21
20
from .misc import is_container
21
+ from .config import mkdir_p
22
22
23
23
from .. import logging , config
24
24
fmlogger = logging .getLogger ("filemanip" )
@@ -431,13 +431,3 @@ def write_rst_dict(info, prefix=''):
431
431
for key , value in sorted (info .items ()):
432
432
out .append (prefix + '* ' + key + ' : ' + str (value ))
433
433
return '\n ' .join (out )+ '\n \n '
434
-
435
-
436
- def mkdir_p (path ):
437
- try :
438
- os .makedirs (path )
439
- except OSError as exc :
440
- if exc .errno == errno .EEXIST and os .path .isdir (path ):
441
- pass
442
- else :
443
- raise
You can’t perform that action at this time.
0 commit comments