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: I5f38f34f59ffed87baa9269aa0f7b848bcacc8fa
Closes-Bug: #1339855 
This commit is contained in:
Ji-Wei
2016年09月03日 11:49:43 +08:00
parent 162546c8cf
commit 4bff8dd96c

View File

@@ -122,7 +122,7 @@ class BGPVPN(neutron.NeutronResource):
self.resource_id_set(bgpvpn['bgpvpn']['id'])
def handle_update(self, json_snippet, tmpl_diff, prop_diff):
raise NotImplemented()
raise NotImplementedError()
def handle_delete(self):
try:
@@ -214,7 +214,7 @@ class BGPVPNNetAssoc(neutron.NeutronResource):
self.resource_id_set(net_assoc['network_association']['id'])
def handle_update(self, json_snippet, tmpl_diff, prop_diff):
raise NotImplemented()
raise NotImplementedError()
def handle_delete(self):
try:
@@ -302,7 +302,7 @@ class BGPVPNRouterAssoc(neutron.NeutronResource):
self.resource_id_set(router_assoc['router_association']['id'])
def handle_update(self, json_snippet, tmpl_diff, prop_diff):
raise NotImplemented()
raise NotImplementedError()
def handle_delete(self):
try:
Reference in New Issue
openstack/networking-bgpvpn
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.