Skip to content

Commit a9ed90b

Browse files
committed
Set *Exception as Connection class attributes for PEP 249
1 parent 906335d commit a9ed90b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tarantool/connection.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
except ImportError:
2020
from ctypes import c_longlong as c_ssize_t
2121

22+
import tarantool
2223
from tarantool.response import Response
2324
from tarantool.request import (
2425
Request,
@@ -62,6 +63,12 @@ class Connection(object):
6263
c_ssize_t, ctypes.c_int,
6364
use_errno=True)(_libc.recv)
6465

66+
Error = tarantool.error
67+
DatabaseError = tarantool.error.DatabaseError
68+
InterfaceError = tarantool.error.InterfaceError
69+
SchemaError = tarantool.error.SchemaError
70+
NetworkError = tarantool.error.NetworkError
71+
6572
def __init__(self, host, port,
6673
user=None,
6774
password=None,

0 commit comments

Comments
 (0)