diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2023-01-18 09:00:25 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2023-01-18 09:00:25 +0100 |
commit | 26d55d4aba1e4cab18567fef65bc78099d764c41 (patch) | |
tree | 90af797f6b4eeaa2b5db427f313eb398eced04b1 | |
parent | fb00dc9e431a10c6484a46aed209416cc2d9cc25 (diff) | |
download | konversation-26d55d4aba1e4cab18567fef65bc78099d764c41.tar.gz konversation-26d55d4aba1e4cab18567fef65bc78099d764c41.zip |
Drop python2 support.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rwxr-xr-x | konversation/scripts/media | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/konversation/scripts/media b/konversation/scripts/media index e369262..dcfc7d3 100755 --- a/konversation/scripts/media +++ b/konversation/scripts/media @@ -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: |