changes Config class in network to only raise exceptions
The Config class should not call fail_json but simply raise exceptions and allow the implementor to handle the exception
This commit is contained in:
parent
7de23a1c5b
commit
107c13759e
1 changed files with 0 additions and 5 deletions
|
@ -116,11 +116,6 @@ class Config(object):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
exc = get_exception()
|
exc = get_exception()
|
||||||
raise NetworkError('undefined method "%s"' % method.__name__, exc=str(exc))
|
raise NetworkError('undefined method "%s"' % method.__name__, exc=str(exc))
|
||||||
except NetworkError:
|
|
||||||
if raise_exc:
|
|
||||||
raise
|
|
||||||
exc = get_exception()
|
|
||||||
self.fail_json(msg=exc.message, **exc.kwargs)
|
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
raise NetworkError('method not supported "%s"' % method.__name__)
|
raise NetworkError('method not supported "%s"' % method.__name__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue