Avoid using None dates on file download (#462)

This commit is contained in:
Birger Jarl 2017-12-27 16:52:33 +03:00 committed by Lonami
parent f8745155ac
commit 73edb0f4ff

View File

@ -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,