changeset 6385:1341be63734a

cleanup: use standard NotImplementedError for abstract methods From the Python docs on NotImplementedError: In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method.
author Søren Løvborg <sorenl@unity3d.com>
date Mon, 02 Jan 2017 21:43:53 +0100
parents 9cf90371d0f1
children aaacb075c3f3
files kallithea/lib/auth.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/auth.py	Mon Jan 02 18:51:37 2017 +0100
+++ b/kallithea/lib/auth.py	Mon Jan 02 21:43:53 2017 +0100
@@ -822,8 +822,7 @@
                 raise HTTPForbidden()
 
     def check_permissions(self):
-        """Dummy function for overriding"""
-        raise Exception('You have to write this function in child class')
+        raise NotImplementedError()
 
 
 class HasPermissionAnyDecorator(PermsDecorator):
@@ -930,8 +929,7 @@
         return result
 
     def check_permissions(self):
-        """Dummy function for overriding"""
-        raise Exception('You have to write this function in child class')
+        raise NotImplementedError()
 
     def _scope(self):
         return '(unknown scope)'