From b8c39f93e28ecfa8608e4f54e7c091a3f1b358e3 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 3 Jan 2019 18:13:05 +0100 Subject: [PATCH] Fix missing import --- telegrambot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegrambot.py b/telegrambot.py index c0c7d867..37d67d3d 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -486,7 +486,7 @@ def cmd_newevent(bot: Bot, update: Update): try: parsed_time = parse_timestring(timestring) if parsed_time < datetime.datetime.now(): - raise PastDateError() + raise errors.PastDateError() except ValueError: bot.send_message(update.message.chat.id, "⚠ Non è stato possibile leggere la data.\n" "Sintassi corretta:\n" @@ -494,7 +494,7 @@ def cmd_newevent(bot: Bot, update: Update): "|{numero}{w|d|h|m}> \n" "[descrizione]```", parse_mode="Markdown") return - except PastDateError: + except errors.PastDateError: bot.send_message(update.message.chat.id, "⚠ La data inserita è una data passata.\n" "per favore inserisci una data futura.\n", parse_mode="Markdown") return