1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-08-18 20:59:38 +02:00

Avoid uninitialized variable (#1204)

fixes #1203
This commit is contained in:
Eduardo Kalinowski 2021-06-22 16:50:06 -03:00 committed by GitHub
parent 750dd3f47f
commit 210719af56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -807,7 +807,7 @@ class Instaloader:
last_scraped = latest_stamps.get_last_story_timestamp(name)
scraped_timestamp = datetime.now().astimezone()
for item in user_story.get_items():
if last_scraped is not None and item.date_utc.replace(tzinfo=timezone.utc) <= last_scraped:
if latest_stamps is not None and item.date_utc.replace(tzinfo=timezone.utc) <= last_scraped:
break
if storyitem_filter is not None and not storyitem_filter(item):
self.context.log("<{} skipped>".format(item), flush=True)