Move try..except block at the top

This commit is contained in:
Dan 2018-06-23 16:00:37 +02:00
parent d06097c68a
commit 06cb2a1168

View File

@ -19,6 +19,13 @@
import asyncio import asyncio
import sys import sys
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
__copyright__ = "Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>".replace( __copyright__ = "Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>".replace(
"\xe8", "\xe8",
"e" if sys.getfilesystemencoding() != "utf-8" else "\xe8" "e" if sys.getfilesystemencoding() != "utf-8" else "\xe8"
@ -42,10 +49,3 @@ from .client import (
MessageHandler, DeletedMessagesHandler, CallbackQueryHandler, MessageHandler, DeletedMessagesHandler, CallbackQueryHandler,
RawUpdateHandler, DisconnectHandler, Filters RawUpdateHandler, DisconnectHandler, Filters
) )
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())