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:
1 changed files with 3 additions and 3 deletions
@@ -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
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.