Skip to content

Commit 7d4649c

Browse files
authored
Merge pull request #20 from anxdpanic/dev
NullHandler python < 2.7
2 parents e90134c + 5c325ba commit 7d4649c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="script.module.python.twitch" name="python-twitch for Kodi" version="1.0.0~beta3" provider-name="A Talented Community">
2+
<addon id="script.module.python.twitch" name="python-twitch for Kodi" version="1.0.0~beta4" provider-name="A Talented Community">
33
<requires>
44
<import addon="xbmc.python" version="2.1.0"/>
55
<import addon="script.module.six" version="1.9.0"/>

resources/lib/twitch/logging.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@
33

44
import logging
55

6+
try:
7+
from logging import NullHandler
8+
except ImportError:
9+
class NullHandler(logging.Handler):
10+
def emit(self, record):
11+
pass
12+
613
log = logging.getLogger('twitch')
7-
log.addHandler(logging.NullHandler())
14+
log.addHandler(NullHandler())
815

916

1017
def deprecation_warning(logger, old, new):

0 commit comments

Comments
 (0)