Commit 9421c7d1 authored by Jim Fulton's avatar Jim Fulton

Removed trailing whitespace.

parent d2bbfea3
...@@ -45,7 +45,7 @@ class DemoStorage(object): ...@@ -45,7 +45,7 @@ class DemoStorage(object):
else: else:
self._temporary_base = False self._temporary_base = False
self.base = base self.base = base
if changes is None: if changes is None:
changes = ZODB.MappingStorage.MappingStorage() changes = ZODB.MappingStorage.MappingStorage()
zope.interface.alsoProvides(self, ZODB.interfaces.IBlobStorage) zope.interface.alsoProvides(self, ZODB.interfaces.IBlobStorage)
...@@ -82,7 +82,7 @@ class DemoStorage(object): ...@@ -82,7 +82,7 @@ class DemoStorage(object):
self.changes = ZODB.blob.BlobStorage(blob_dir, self.changes) self.changes = ZODB.blob.BlobStorage(blob_dir, self.changes)
self._copy_methods_from_changes(self.changes) self._copy_methods_from_changes(self.changes)
return True return True
def cleanup(self): def cleanup(self):
self.base.cleanup() self.base.cleanup()
self.changes.cleanup() self.changes.cleanup()
...@@ -95,7 +95,7 @@ class DemoStorage(object): ...@@ -95,7 +95,7 @@ class DemoStorage(object):
def _copy_methods_from_changes(self, changes): def _copy_methods_from_changes(self, changes):
for meth in ( for meth in (
'_lock_acquire', '_lock_release', '_lock_acquire', '_lock_release',
'getSize', 'history', 'isReadOnly', 'registerDB', 'getSize', 'history', 'isReadOnly', 'registerDB',
'sortKey', 'tpc_transaction', 'tpc_vote', 'sortKey', 'tpc_transaction', 'tpc_vote',
): ):
...@@ -230,7 +230,7 @@ class DemoStorage(object): ...@@ -230,7 +230,7 @@ class DemoStorage(object):
raise TypeError( raise TypeError(
"Garbage collection isn't supported" "Garbage collection isn't supported"
" when there is a base storage.") " when there is a base storage.")
try: try:
self.changes.pack(t, referencesf, gc=False) self.changes.pack(t, referencesf, gc=False)
except TypeError, v: except TypeError, v:
...@@ -262,7 +262,7 @@ class DemoStorage(object): ...@@ -262,7 +262,7 @@ class DemoStorage(object):
old = self.base.load(oid, '')[1] old = self.base.load(oid, '')[1]
except ZODB.POSException.POSKeyError: except ZODB.POSException.POSKeyError:
old = serial old = serial
if old != serial: if old != serial:
raise ZODB.POSException.ConflictError( raise ZODB.POSException.ConflictError(
oid=oid, serials=(old, serial)) # XXX untested branch oid=oid, serials=(old, serial)) # XXX untested branch
...@@ -332,7 +332,7 @@ class DemoStorage(object): ...@@ -332,7 +332,7 @@ class DemoStorage(object):
_temporary_blobdirs = {} _temporary_blobdirs = {}
def cleanup_temporary_blobdir( def cleanup_temporary_blobdir(
ref, ref,
_temporary_blobdirs=_temporary_blobdirs, # Make sure it stays around _temporary_blobdirs=_temporary_blobdirs, # Make sure it stays around
): ):
blob_dir = _temporary_blobdirs.pop(ref, None) blob_dir = _temporary_blobdirs.pop(ref, None)
if blob_dir and os.path.exists(blob_dir): if blob_dir and os.path.exists(blob_dir):
......
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