Commit 895b168c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2f662197
......@@ -46,7 +46,7 @@ from errno import EINVAL, ENOENT, ENOTCONN
from stat import S_ISDIR
from signal import SIGQUIT, SIGKILL
from golang import go, chan, select, func, defer, default
from golang import context, sync, time
from golang import context, errors, sync, time
from zodbtools.util import ashex as h, fromhex
import pytest; xfail = pytest.mark.xfail
from pytest import raises, fail
......@@ -948,7 +948,7 @@ def doCheckingPin(f, pinokByWLink, pinfunc=None): # -> []event(str)
try:
req = wlink.recvReq(ctx)
except Exception as e:
if e is context.canceled: # XXX -> errors.Is
if errors.Is(e, context.canceled):
return # cancel is expected after f completes
raise
......@@ -1984,7 +1984,7 @@ def procwait_(ctx, proc): # -> ok
try:
procwait(ctx, proc)
except Exception as e:
if e in (context.canceled, context.deadlineExceeded): # XXX -> errors.Is
if errors.Is(e, context.canceled) or errors.Is(e, context.deadlineExceeded):
return False
raise
return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment