Commit 8b469aba authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0448570a
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# #
# See COPYING file for full licensing terms. # See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options. # See https://www.nexedi.com/licensing for rationale and options.
from wendelin.lib.zodb import LivePersistent, deactivate_btree, dbclose, zconn_at, zstor_2zurl, zmajor from wendelin.lib.zodb import LivePersistent, deactivate_btree, dbclose, zconn_at, zstor_2zurl
from wendelin.lib.testing import getTestDB from wendelin.lib.testing import getTestDB
from wendelin.lib import testing from wendelin.lib import testing
from persistent import Persistent, UPTODATE, GHOST, CHANGED from persistent import Persistent, UPTODATE, GHOST, CHANGED
...@@ -28,8 +28,6 @@ from BTrees.IOBTree import IOBTree ...@@ -28,8 +28,6 @@ from BTrees.IOBTree import IOBTree
import transaction import transaction
from transaction import TransactionManager from transaction import TransactionManager
from golang import defer, func from golang import defer, func
from golang import context, sync
from random import randint
from pytest import raises from pytest import raises
import pytest; xfail = pytest.mark.xfail import pytest; xfail = pytest.mark.xfail
......
...@@ -87,7 +87,6 @@ concurrency bugs that lead to corrupt data. ...@@ -87,7 +87,6 @@ concurrency bugs that lead to corrupt data.
from __future__ import print_function from __future__ import print_function
from ZODB import DB from ZODB import DB
from ZODB.FileStorage import FileStorage
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
import transaction import transaction
from persistent import Persistent from persistent import Persistent
......
...@@ -312,7 +312,7 @@ def _mntpt_4zurl(zurl): ...@@ -312,7 +312,7 @@ def _mntpt_4zurl(zurl):
# mkdir /tmp/wcfs with stiky bit. This way multiple users can create subdirectories inside. # mkdir /tmp/wcfs with stiky bit. This way multiple users can create subdirectories inside.
wcfsroot = "%s/wcfs" % (tempfile.gettempdir()) wcfsroot = "%s/wcfs" % (tempfile.gettempdir())
wcfsmode = 0777 | stat.S_ISVTX wcfsmode = 0o777 | stat.S_ISVTX
if _mkdir_p(wcfsroot): if _mkdir_p(wcfsroot):
os.chmod(wcfsroot, wcfsmode) os.chmod(wcfsroot, wcfsmode)
else: else:
...@@ -329,7 +329,7 @@ def _mntpt_4zurl(zurl): ...@@ -329,7 +329,7 @@ def _mntpt_4zurl(zurl):
# mkdir -p. # mkdir -p.
def _mkdir_p(path, mode=0777): # -> created(bool) def _mkdir_p(path, mode=0o777): # -> created(bool)
try: try:
os.makedirs(path, mode) os.makedirs(path, mode)
except OSError as e: except OSError as e:
......
...@@ -859,7 +859,7 @@ def watch(twlink, zf, at, pinok=None): # -> tWatch ...@@ -859,7 +859,7 @@ def watch(twlink, zf, at, pinok=None): # -> tWatch
# blk ∉ pin_prev, blk ∈ pin -> cannot happen, except on first start # blk ∉ pin_prev, blk ∈ pin -> cannot happen, except on first start
if blk not in pin_prev and blk in pin: if blk not in pin_prev and blk in pin:
if at_prev is not None: if at_prev is not None:
fail('#%d pinned %s; not pinned %s' % (at_prev, at)) fail('#%d pinned %s; not pinned %s' % (blk, at_prev, at))
# blk ∈ pin -> blk is tracked; has rev > at # blk ∈ pin -> blk is tracked; has rev > at
# (see criteria in _pinnedAt) # (see criteria in _pinnedAt)
......
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