Skip to content

Commit e6c1735

Browse files
committed
Fix string-based error inspection on Python 3
1 parent 9ac1058 commit e6c1735

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nipype/interfaces/io.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def copytree(src, dst, use_hardlink=False):
7171
try:
7272
os.makedirs(dst)
7373
except OSError as why:
74-
if 'File exists' in why:
74+
if 'File exists' in str(why):
7575
pass
7676
else:
7777
raise why
@@ -687,7 +687,7 @@ def _list_outputs(self):
687687
try:
688688
os.makedirs(outdir)
689689
except OSError as inst:
690-
if 'File exists' in inst:
690+
if 'File exists' in str(inst):
691691
pass
692692
else:
693693
raise(inst)
@@ -738,7 +738,7 @@ def _list_outputs(self):
738738
try:
739739
os.makedirs(path)
740740
except OSError as inst:
741-
if 'File exists' in inst:
741+
if 'File exists' in str(inst):
742742
pass
743743
else:
744744
raise(inst)

0 commit comments

Comments
 (0)