Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def session(cls, set_to=None):
"""Keep one ArchiveSession object for the whole program.
The session doesn't seem to keep any state so this should be
fine.
"""
if set_to:
cls._session = set_to
if not cls._session:
cls._session = ia.session.ArchiveSession()
return cls._session
def session(cls, set_to=None):
"""Keep one ArchiveSession object for the whole program.
The session doesn't seem to keep any state so this should be
fine.
"""
if set_to:
cls._session = set_to
if not cls._session:
cls._session = ia.session.ArchiveSession()
return cls._session
def session(cls, set_to=None):
"""Keep one ArchiveSession object for the whole program.
The session doesn't seem to keep any state so this should be
fine.
"""
if set_to:
cls._session = set_to
if not cls._session:
cls._session = ia.session.ArchiveSession()
return cls._session