Corrected after_pick() logic

This commit is contained in:
Anon 2023-03-12 20:16:44 -07:00
parent 958265e82b
commit 53b2dd456d

View File

@ -125,11 +125,13 @@ class YandereBot(FediBot.YandereBot):
# Maybe I should remove this from the backend?
def print_header_stats(self, picked):
profile, frame, nsfw, path = None, None, None, None
if picked:
profile = picked.profile_name
frame = picked.picked_frame
nsfw = picked.is_nsfw()
path = picked.output_name_tr
print("Profile: {} | Frame: {} | NSFW: {} | Path: {}".format(
profile, frame, nsfw, path
))
@ -151,7 +153,10 @@ class YandereBot(FediBot.YandereBot):
}
def after_pick(self, picked):
self.print_header_stats(picked["picked"])
if picked:
self.print_header_stats(picked["picked"])
else:
self.print_header_stats(None)
def post(self, picked):
try: