Skip to content

Commit db99b54

Browse files
authored
Merge pull request #23 from anxdpanic/dev
2.6 compat format
2 parents 9453544 + 051f1f0 commit db99b54

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
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~beta6" provider-name="A Talented Community">
2+
<addon id="script.module.python.twitch" name="python-twitch for Kodi" version="1.0.0~beta7" 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/parser.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def clip_embed_wrapper(*args, **kwargs):
3939

4040

4141
def m3u8_to_dict(string):
42-
log.debug('m3u8_to_dict called for:\n{}'.format(string))
42+
log.debug('m3u8_to_dict called for:\n{0}'.format(string))
4343
d = dict()
4444
matches = re.finditer(_m3u_pattern, string)
4545
for m in matches:
@@ -51,12 +51,12 @@ def m3u8_to_dict(string):
5151
'url': m.group('url'),
5252
'bandwidth': int(m.group('bandwidth'))
5353
}
54-
log.debug('m3u8_to_dict result:\n{}'.format(d))
54+
log.debug('m3u8_to_dict result:\n{0}'.format(d))
5555
return d
5656

5757

5858
def m3u8_to_list(string):
59-
log.debug('m3u8_to_list called for:\n{}'.format(string))
59+
log.debug('m3u8_to_list called for:\n{0}'.format(string))
6060
l = list()
6161
matches = re.finditer(_m3u_pattern, string)
6262
for m in matches:
@@ -69,12 +69,12 @@ def m3u8_to_list(string):
6969
'bandwidth': int(m.group('bandwidth'))
7070
})
7171

72-
log.debug('m3u8_to_list result:\n{}'.format(l))
72+
log.debug('m3u8_to_list result:\n{0}'.format(l))
7373
return l
7474

7575

7676
def clip_embed_to_list(string):
77-
log.debug('clip_embed_to_list called for:\n{}'.format(string))
77+
log.debug('clip_embed_to_list called for:\n{0}'.format(string))
7878
match = re.search(_clip_embed_pattern, string)
7979
l = list()
8080
if match:
@@ -93,5 +93,5 @@ def clip_embed_to_list(string):
9393
'bandwidth': -1
9494
})
9595

96-
log.debug('clip_embed_to_list result:\n{}'.format(l))
96+
log.debug('clip_embed_to_list result:\n{0}'.format(l))
9797
return l

resources/lib/twitch/queries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ def __init__(self, path, method=methods.GET):
151151
def assert_new(d, k):
152152
if k in d:
153153
v = d.get(k)
154-
raise ValueError("Key '{}' already set to '{}'".format(k, v))
154+
raise ValueError("Key '{0}' already set to '{1}'".format(k, v))
155155

156156

157157
# TODO maybe rename
158158
def query(f):
159159
def wrapper(*args, **kwargs):
160160
qry = f(*args, **kwargs)
161161
if not isinstance(qry, _Query):
162-
raise ValueError('{} did not return a Query, was: {}'.format(f.__name__, repr(qry)))
162+
raise ValueError('{0} did not return a Query, was: {1}'.format(f.__name__, repr(qry)))
163163
log.debug('%s QUERY: url: %s, params: %s, data: %s, '
164164
'headers: %r, target_func: %r',
165165
qry.method, qry.url, qry.params, qry.data, qry.headers, f.__name__)

0 commit comments

Comments
 (0)