Commit a3f73429 authored by Chris McDonough's avatar Chris McDonough

Remove unused method and document new constructor arguments.

parent 408e93a1
...@@ -111,7 +111,8 @@ class ClientStorage(object): ...@@ -111,7 +111,8 @@ class ClientStorage(object):
wait_for_server_on_startup=None, # deprecated alias for wait wait_for_server_on_startup=None, # deprecated alias for wait
wait=None, wait_timeout=None, wait=None, wait_timeout=None,
read_only=0, read_only_fallback=0, read_only=0, read_only_fallback=0,
username='', password='', realm=None, blob_dir="/tmp"): username='', password='', realm=None,
blob_dir=tempfile.gettempdir()):
"""ClientStorage constructor. """ClientStorage constructor.
This is typically invoked from a custom_zodb.py file. This is typically invoked from a custom_zodb.py file.
...@@ -182,6 +183,11 @@ class ClientStorage(object): ...@@ -182,6 +183,11 @@ class ClientStorage(object):
password -- string with plaintext password to be used password -- string with plaintext password to be used
when authenticated. when authenticated.
realm -- not documented.
blob_dir -- directory path for blob data. 'blob data' is data that
is retrieved via the loadBlob API.
Note that the authentication protocol is defined by the server Note that the authentication protocol is defined by the server
and is detected by the ClientStorage upon connecting (see and is detected by the ClientStorage upon connecting (see
testConnection() and doAuth() for details). testConnection() and doAuth() for details).
...@@ -909,11 +915,8 @@ class ClientStorage(object): ...@@ -909,11 +915,8 @@ class ClientStorage(object):
""" """
return self._getCleanFilename(oid, serial) + "." + BLOB_DIRTY return self._getCleanFilename(oid, serial) + "." + BLOB_DIRTY
def _getBlobPath(self, oid):
return self.blob_dir
def _getCleanFilename(self, oid, tid): def _getCleanFilename(self, oid, tid):
return os.path.join(self._getBlobPath(oid), return os.path.join(self.blob_dir,
"%s-%s%s" % (utils.oid_repr(oid), "%s-%s%s" % (utils.oid_repr(oid),
utils.tid_repr(tid), utils.tid_repr(tid),
BLOB_SUFFIX,) BLOB_SUFFIX,)
......
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