Skip to content

Commit c3ee6a4

Browse files
committed
FIX: Drop Bunch.keys, use existing dictcopy method
1 parent 8f921ba commit c3ee6a4

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

nipype/interfaces/base/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def run(self, cwd=None, ignore_exception=None, **inputs):
500500
platform=platform.platform(),
501501
hostname=platform.node(),
502502
version=self.version)
503-
runtime_attrs = set(runtime.keys())
503+
runtime_attrs = set(runtime.dictcopy())
504504

505505
mon_sp = None
506506
if enable_rm:
@@ -541,7 +541,7 @@ def run(self, cwd=None, ignore_exception=None, **inputs):
541541
if not ignore_exception:
542542
raise
543543
finally:
544-
if runtime is None or runtime_attrs - set(runtime.keys()):
544+
if runtime is None or runtime_attrs - set(runtime.dictcopy()):
545545
raise RuntimeError("{} interface failed to return valid "
546546
"runtime object".format(
547547
interface.__class__.__name__))

nipype/interfaces/base/support.py

-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ def update(self, *args, **kwargs):
6868
Note: update is very much like HasTraits.set"""
6969
self.__dict__.update(*args, **kwargs)
7070

71-
def keys(self):
72-
return list(self.__dict__.keys())
73-
7471
def items(self):
7572
"""iterates over bunch attributes as key, value pairs"""
7673
return list(self.__dict__.items())

0 commit comments

Comments
 (0)