Commit 3740f199 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Make Storage.close() a no-op.

Behaviour is not defined for NEO but shutting down the client side seems
really bad (close is aliased to __del__).
Move no-op methods (close & cleanup) at file end, with not implemented ones.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1793 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent af54b1e4
...@@ -38,14 +38,6 @@ class Storage(BaseStorage.BaseStorage, ...@@ -38,14 +38,6 @@ class Storage(BaseStorage.BaseStorage,
except NEOStorageNotFoundError: except NEOStorageNotFoundError:
raise POSException.POSKeyError(oid) raise POSException.POSKeyError(oid)
def close(self):
return self.app.close()
def cleanup(self):
# Used in unit tests to remove local database files.
# We have no such thing, so make this method a no-op.
pass
def new_oid(self): def new_oid(self):
if self._is_read_only: if self._is_read_only:
raise POSException.ReadOnlyError() raise POSException.ReadOnlyError()
...@@ -154,3 +146,15 @@ class Storage(BaseStorage.BaseStorage, ...@@ -154,3 +146,15 @@ class Storage(BaseStorage.BaseStorage,
def set_max_oid(self, possible_new_max_oid): def set_max_oid(self, possible_new_max_oid):
# seems used only by FileStorage # seems used only by FileStorage
raise NotImplementedError raise NotImplementedError
def cleanup(self):
# Used in unit tests to remove local database files.
# We have no such thing, so make this method a no-op.
pass
def close(self):
# The purpose of this method is unclear, the NEO implementation may
# stop the client node or ask the primary master to shutdown/freeze the
# cluster. For now make this a no-op.
pass
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