aboutsummaryrefslogtreecommitdiff
path: root/discord/__init__.py
diff options
context:
space:
mode:
authorNadir Chowdhury <[email protected]>2020-11-28 08:16:49 +0000
committerGitHub <[email protected]>2020-11-28 03:16:49 -0500
commit6b803acde4f6377b8ccad959350a61a3d524b619 (patch)
treeb7e573aeb48562dd567983eb6f2283e1cd3a0d0b /discord/__init__.py
parentFix `UnboundLocalError` for editing `public_updates_channel` (diff)
downloaddiscord.py-6b803acde4f6377b8ccad959350a61a3d524b619.tar.xz
discord.py-6b803acde4f6377b8ccad959350a61a3d524b619.zip
[chore] Remove redundant imports
This also removes the historical patch for NullHandler implemented in bbf1c54, as it has been available since Python 3.1.
Diffstat (limited to 'discord/__init__.py')
-rw-r--r--discord/__init__.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/discord/__init__.py b/discord/__init__.py
index 802f4cae..1720f494 100644
--- a/discord/__init__.py
+++ b/discord/__init__.py
@@ -64,11 +64,4 @@ VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel serial')
version_info = VersionInfo(major=1, minor=6, micro=0, releaselevel='alpha', serial=0)
-try:
- from logging import NullHandler
-except ImportError:
- class NullHandler(logging.Handler):
- def emit(self, record):
- pass
-
-logging.getLogger(__name__).addHandler(NullHandler())
+logging.getLogger(__name__).addHandler(logging.NullHandler())