Update __init__.py

This commit is contained in:
Jay Lee
2022-09-14 18:02:59 -04:00
committed by GitHub
parent 6ab8fbf538
commit dd5fd2a2c3

View File

@@ -339,9 +339,10 @@ def get_all_pages(service,
else: else:
kwargs.update(page_key) kwargs.update(page_key)
if GC_Values[GC_LOW_MEMORY]: if GC_Values[GC_LOW_MEMORY]:
tempdir = TemporaryDirectory( kwargs = {'prefix': 'GAM-'}
prefix='GAM-', if sys.version_info.minor >= 10:
ignore_cleanup_errors=True) kwargs['ignore_cleanup_errors'] = True
tempdir = TemporaryDirectory(**kwargs)
tempfile = os.path.join(tempdir.name, 'gapi_pages') tempfile = os.path.join(tempdir.name, 'gapi_pages')
all_items = shelve.open(tempfile) all_items = shelve.open(tempfile)
# attach tempdir to all_items so we # attach tempdir to all_items so we