mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 05:04:33 +03:00
Avoid using None dates on file download (#462)
This commit is contained in:
parent
f8745155ac
commit
73edb0f4ff
|
@ -954,6 +954,8 @@ class TelegramClient(TelegramBareClient):
|
|||
name = None
|
||||
|
||||
if not name:
|
||||
if not date:
|
||||
date = datetime.now()
|
||||
name = '{}_{}-{:02}-{:02}_{:02}-{:02}-{:02}'.format(
|
||||
kind,
|
||||
date.year, date.month, date.day,
|
||||
|
|
Loading…
Reference in New Issue
Block a user