Replace run_generator with gentools.run.

This commit is contained in:
voussoir 2021-08-31 19:23:56 -07:00
parent 071b290fe6
commit 2e0b4cfa14
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
2 changed files with 2 additions and 5 deletions

View file

@ -405,10 +405,6 @@ def remove_path_badchars(filepath, allowed=''):
filepath = filepath.replace('\\', os.sep) filepath = filepath.replace('\\', os.sep)
return filepath return filepath
def run_generator(g):
for x in g:
pass
def slice_before(li, item): def slice_before(li, item):
index = li.index(item) index = li.index(item)
return li[:index] return li[:index]

View file

@ -3,6 +3,7 @@ import os
import urllib.parse import urllib.parse
from voussoirkit import flasktools from voussoirkit import flasktools
from voussoirkit import gentools
from voussoirkit import stringtools from voussoirkit import stringtools
import etiquette import etiquette
@ -92,7 +93,7 @@ def post_album_refresh_directories(album_id):
if not directory.is_dir: if not directory.is_dir:
continue continue
digest = common.P.digest_directory(directory, new_photo_ratelimit=0.1) digest = common.P.digest_directory(directory, new_photo_ratelimit=0.1)
etiquette.helpers.run_generator(digest) gentools.run(digest)
common.P.commit(message='refresh album directories endpoint') common.P.commit(message='refresh album directories endpoint')
return flasktools.make_json_response({}) return flasktools.make_json_response({})