aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/grpc/framework/face/exceptions.py
diff options
context:
space:
mode:
authorGravatar Leifur Halldor Asgeirsson <lasgeirsson@zerofail.com>2016-03-04 12:46:55 -0500
committerGravatar Leifur Halldor Asgeirsson <lasgeirsson@zerofail.com>2016-03-18 15:58:19 -0400
commit1abda1f02ba2412ae845f1427370c52cef821756 (patch)
tree34eaf15b1fbda1ad4fe941f31ab0f967d4e223db /src/python/grpcio/grpc/framework/face/exceptions.py
parent4302be789d89703d48f033c44720f828765f1467 (diff)
specify metaclasses in a py3-compatible way
Diffstat (limited to 'src/python/grpcio/grpc/framework/face/exceptions.py')
-rw-r--r--src/python/grpcio/grpc/framework/face/exceptions.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/python/grpcio/grpc/framework/face/exceptions.py b/src/python/grpcio/grpc/framework/face/exceptions.py
index f112df70bc..c272ac75ab 100644
--- a/src/python/grpcio/grpc/framework/face/exceptions.py
+++ b/src/python/grpcio/grpc/framework/face/exceptions.py
@@ -1,4 +1,4 @@
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,8 @@
import abc
+import six
+
class NoSuchMethodError(Exception):
"""Raised by customer code to indicate an unrecognized RPC method name.
@@ -49,12 +51,11 @@ class NoSuchMethodError(Exception):
self.name = name
-class RpcError(Exception):
+class RpcError(six.with_metaclass(abc.ABCMeta, Exception)):
"""Common super type for all exceptions raised by the Face layer.
Only RPC Framework should instantiate and raise these exceptions.
"""
- __metaclass__ = abc.ABCMeta
class CancellationError(RpcError):