diff options
author | Ji-Wei <ji.wei3@zte.com.cn> | 2016-09-02 18:46:50 +0800 |
---|---|---|
committer | Ji-Wei <ji.wei3@zte.com.cn> | 2016-09-02 18:49:42 +0800 |
commit | 7549babd90858e7696079a3340270a06e20ed07b (patch) | |
tree | 9dfd1836be2413f81f883241623d80231d7dd91c /os_net_config/impl_eni.py | |
parent | f79d534c3e130bb539cf7ccb1d3f9586e922b9a7 (diff) |
Raise NotImplementedError instead of NotImplemented
NotImplementedError is the name of the exception
(https://docs.python.org/2/library/exceptions.html).
NotImplemented is the name of a constant
(https://docs.python.org/2/library/constants.html).
>>> raise NotImplemented()
Traceback (most recent call last):
File "<pyshell#31>", line 1, in <module>
raise NotImplemented()
TypeError: 'NotImplementedType' object is not callable
>>> raise NotImplementedError()
Traceback (most recent call last):
File "<pyshell#32>", line 1, in <module>
raise NotImplementedError()
NotImplementedError
This patch fix it.
Change-Id: I8b8b47de26b9bf688d9d27a4daa6d9910994ac4a
Closes-Bug: #1339855
Diffstat (limited to 'os_net_config/impl_eni.py')
-rw-r--r-- | os_net_config/impl_eni.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/os_net_config/impl_eni.py b/os_net_config/impl_eni.py index ae60099..d15872e 100644 --- a/os_net_config/impl_eni.py +++ b/os_net_config/impl_eni.py @@ -134,7 +134,7 @@ class ENINetConfig(os_net_config.NetConfig): data += " mtu %i\n" % interface.mtu if interface.hwaddr: - raise NotImplemented("hwaddr is not implemented.") + raise NotImplementedError("hwaddr is not implemented.") if ovs_extra: data += " ovs_extra %s\n" % " -- ".join(ovs_extra) |