summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkonversation/scripts/media7
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: