Fixed crash when handling FileTooLarge or InvalidMimeType exception
This commit is contained in:
parent
16cdad7edf
commit
de66d617ed
@ -184,7 +184,7 @@ class YandereBot(FediBot.YandereBot):
|
|||||||
# Invalid post (remove downloaded files)
|
# Invalid post (remove downloaded files)
|
||||||
except (FileTooLarge, InvalidMimeType) as e:
|
except (FileTooLarge, InvalidMimeType) as e:
|
||||||
if picked:
|
if picked:
|
||||||
os.remove(picked["full_path"])
|
os.remove(picked["picked"]["full_path"])
|
||||||
print("Unable to post:", e)
|
print("Unable to post:", e)
|
||||||
|
|
||||||
# Other Exceptions
|
# Other Exceptions
|
||||||
|
Reference in New Issue
Block a user