MCPcopy Create free account
hub / github.com/DragonisCV/RAM / __init__

Method __init__

ram/utils/file_client.py:32–45  ·  view source on GitHub ↗
(self, server_list_cfg, client_cfg, sys_path=None)

Source from the content-addressed store, hash-verified

30 """
31
32 def __init__(self, server_list_cfg, client_cfg, sys_path=None):
33 if sys_path is not None:
34 import sys
35 sys.path.append(sys_path)
36 try:
37 import mc
38 except ImportError:
39 raise ImportError('Please install memcached to enable MemcachedBackend.')
40
41 self.server_list_cfg = server_list_cfg
42 self.client_cfg = client_cfg
43 self._client = mc.MemcachedClient.GetInstance(self.server_list_cfg, self.client_cfg)
44 # mc.pyvector servers as a point which points to a memory cache
45 self._mc_buffer = mc.pyvector()
46
47 def get(self, filepath):
48 filepath = str(filepath)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected