Skip to content

Commit 46be012

Browse files
committed
RF: Don't store value in InvalidElemError
1 parent 109c65e commit 46be012

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nibabel/elemcont.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ class InvalidElemError(Exception):
2828
'''The object being added to the container doesn't have a `value` attribute
2929
'''
3030
def __init__(self, invalid_val):
31-
self.invalid_val = invalid_val
3231
message = ("Provided value '%s' of type %s does not have a 'value' "
33-
"attribute" % (self.invalid_val, type(invalid_val)))
32+
"attribute" % (invalid_val, type(invalid_val)))
3433
super(InvalidElemError, self).__init__(message)
3534

3635

0 commit comments

Comments
 (0)