From 4872ce9c22cc3c7024075f66409efdaf8860e9b8 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Wed, 11 May 2022 12:43:38 +1000 Subject: Do minor code cleanup --- backend/data/downloadImgsForReview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/data/downloadImgsForReview.py') diff --git a/backend/data/downloadImgsForReview.py b/backend/data/downloadImgsForReview.py index 03e22a8..d5ccf62 100755 --- a/backend/data/downloadImgsForReview.py +++ b/backend/data/downloadImgsForReview.py @@ -66,10 +66,10 @@ if not os.path.exists(outDir): print("Finding next ID to download for") nextIdx = 0 fileList = os.listdir(outDir) -ids = list(map(lambda filename: int(filename.split(" ")[0]), fileList)) +ids = [int(filename.split(" ")[0]) for filename in fileList] if len(ids) > 0: ids.sort() - nextIdx = eolIds.index(ids[-1]) + nextIdx = eolIds.index(ids[-1]) + 1 if nextIdx == len(eolIds): print("No IDs left. Exiting...") sys.exit(0) -- cgit v1.2.3