Skip to content

Commit

Permalink
updated based on merge NeurodataWithoutBorders#61 and NeurodataWithou…
Browse files Browse the repository at this point in the history
  • Loading branch information
nicain committed Aug 9, 2017
1 parent 8019019 commit ecfffb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/form/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from collections import Iterable
from abc import ABCMeta
import six
from six import raise_from
import numpy as np

def __type_okay(value, argtype, allow_none=False):
Expand Down Expand Up @@ -266,15 +267,15 @@ def func_call(*args, **kwargs):
parse_err = parsed.get('errors')
if parse_err:
msg = ', '.join(parse_err)
raise TypeError(msg) from None
raise_from(TypeError(msg), None)
return func(self, **parsed['args'])
else:
def func_call(*args, **kwargs):
parsed = __parse_args(_copy.deepcopy(loc_val), args, kwargs, enforce_type=enforce_type)
parse_err = parsed.get('errors')
if parse_err:
msg = ', '.join(parse_err)
raise TypeError(msg) from None
raise_from(TypeError(msg), None)
return func(**parsed['args'])
_rtype = rtype
if isinstance(rtype, type):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/form_tests/utils_test/test_core_NWBContainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class MyTestClass(NWBContainer):

def __init__(self, src, parent=None):
super().__init__(src, parent=parent)
super(MyTestClass, self).__init__(src, parent=parent)

def basic_add(self, **kwargs):
return kwargs
Expand Down

0 comments on commit ecfffb6

Please sign in to comment.