MCPcopy
hub / github.com/cherrypy/cherrypy / setup

Method setup

cherrypy/lib/sessions.py:503–514  ·  view source on GitHub ↗

Set up the storage system for file-based sessions. This should only be called once per process; this will be done automatically when using sessions.init (as the built-in Tool does).

(cls, **kwargs)

Source from the content-addressed store, hash-verified

501
502 @classmethod
503 def setup(cls, **kwargs):
504 """Set up the storage system for file-based sessions.
505
506 This should only be called once per process; this will be done
507 automatically when using sessions.init (as the built-in Tool
508 does).
509 """
510 # The 'storage_path' arg is required for file-based sessions.
511 kwargs['storage_path'] = os.path.abspath(kwargs['storage_path'])
512
513 for k, v in kwargs.items():
514 setattr(cls, k, v)
515
516 def _get_file_path(self):
517 f = os.path.join(self.storage_path, self.SESSION_PREFIX + self.id)

Callers 2

setup.pyFile · 0.45
initFunction · 0.45

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected