From b7a67cd5220cd7c2156dfa945ddde69b39603a4d Mon Sep 17 00:00:00 2001 From: Suren Khorenyan Date: Sun, 10 Jun 2018 13:40:33 +0300 Subject: [PATCH] Babel is in requirements now --- aiogram/types/user.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/aiogram/types/user.py b/aiogram/types/user.py index d27f2f87..2143f06c 100644 --- a/aiogram/types/user.py +++ b/aiogram/types/user.py @@ -1,12 +1,9 @@ +import babel + from . import base from . import fields from ..utils import markdown -try: - import babel -except ImportError: - babel = None - class User(base.TelegramObject): """ @@ -51,10 +48,7 @@ class User(base.TelegramObject): This property requires `Babel `_ module :return: :class:`babel.core.Locale` - :raise: ImportError: when babel is not installed. """ - if not babel: - raise ImportError('Babel is not installed!') if not self.language_code: return None if not hasattr(self, '_locale'):