Skip to content

Commit 7f38e40

Browse files
committed
fix: check with str and bytes
1 parent 9fbeef4 commit 7f38e40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/utils/nipype2boutiques.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from __future__ import (print_function, division, unicode_literals,
33
absolute_import)
44

5-
from builtins import str, open
5+
from builtins import str, open, bytes
66
# This tool exports a Nipype interface in the Boutiques (https://github.com/boutiques) JSON format.
77
# Boutiques tools can be imported in CBRAIN (https://github.com/aces/cbrain) among other platforms.
88
#
@@ -40,7 +40,7 @@ def generate_boutiques_descriptor(
4040
raise Exception("Undefined module.")
4141

4242
# Retrieves Nipype interface
43-
if isinstance(module, str):
43+
if isinstance(module, (str, bytes)):
4444
import_module(module)
4545
module_name = str(module)
4646
module = sys.modules[module]

0 commit comments

Comments
 (0)