[Piglit] [PATCH 07/12] regsitry/gl.py: Make Error class inherit from Exception

Dylan Baker baker.dylan.c at gmail.com
Tue Jan 13 17:48:17 PST 2015


In python 2 it is expected that errors descend from Exception, but there
is no requirement that they do so, in python 3 it is required. This also
is problematic because it makes the exception class an old style class,
which has all the problems associated with old style classes.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 registry/gl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/registry/gl.py b/registry/gl.py
index c1ba2ef..99f4a41 100644
--- a/registry/gl.py
+++ b/registry/gl.py
@@ -318,7 +318,7 @@ class ImmutableOrderedKeyedSet(OrderedKeyedSet):
         raise ImmutableError
 
 
-class ImmutableError:
+class ImmutableError(Exception):
     pass
 
 
-- 
2.2.1



More information about the Piglit mailing list