Drop python2 support.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/6/head
Slávek Banko 2 years ago
parent fb00dc9e43
commit 26d55d4aba
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -68,13 +68,14 @@ import os
import sys
import re
import string
from functools import reduce
try:
APP_ID = sys.argv[1]
IRC_SERVER = sys.argv[2]
TARGET = sys.argv[3]
except IndexError:
print >>sys.stderr, "This script is intended to be run from within Konversation."
print("This script is intended to be run from within Konversation.", file=sys.stderr)
sys.exit(0)
if (sys.hexversion >> 16) < 0x0204:
@ -137,7 +138,7 @@ class Player(object):
#Update args last to prevent non-sensical override in formatVariables
x={'title':title, 'artist':artist, 'album':album}
if FIXUP:
for i,j in x.items():
for i,j in list(x.items()):
if re.search(FIXUP,j):
x[i]='%s%s%s'%(QUOTE_BEFORE,j,QUOTE_AFTER)
self._format.update(x)
@ -408,7 +409,7 @@ def run(kind):
unsorted=dict([(i.displayName.lower(),i) for i in PLAYERS if kind in i.type])
play=[unsorted.pop(i.lower(),Player("ImproperlySupported")) for i in playerRankings[kind]]
if len(unsorted):
play.extend(unsorted.values())
play.extend(list(unsorted.values()))
else:
play=[i for i in PLAYERS if i.displayName.lower() == kind]
try:

Loading…
Cancel
Save