Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #5 from Kaze3/master
Browse files Browse the repository at this point in the history
Python 3 fixes
  • Loading branch information
decibyte committed Jul 16, 2012
2 parents f825b29 + 57528ae commit 912cf19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bin/pylms
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PROJECT = "PyLMS"
VERSION = "1.00"

logger = logging.getLogger(__name__)
LOG_HELP = ','.join(["%d=%s" % (4-x, logging.getLevelName((x+1)*10)) for x in xrange(5)])
LOG_HELP = ','.join(["%d=%s" % (4-x, logging.getLevelName((x+1)*10)) for x in range(5)])
LOG_FORMAT_CONS = '%(levelname)s: %(message)s'
LOG_FORMAT_FILE = '%(asctime)s %(name)s[%(process)d] %(levelname)10s %(message)s'
LOGLEVEL_DICT = { 1 : 50, 2:40, 3:20, 4:10, 5:1 }
Expand Down Expand Up @@ -59,7 +59,7 @@ if options.logfile is None:
else:
logfilename = os.path.normpath(options.logfile)
logging.basicConfig(level=verbosity, format=LOG_FORMAT_FILE, filename=logfilename, filemode='a')
print >> sys.stderr, "Logging to %s" % logfilename
print("Logging to %s" % logfilename, file=sys.stderr)

# Main

Expand Down Expand Up @@ -124,7 +124,7 @@ if len(players)==0:
result = func(*params)
if options.raw:
if result is not None:
print result
print(result)
else:
if result is None:
result = "No Output"
Expand All @@ -145,7 +145,7 @@ else:
result = func(*params)
if options.raw:
if result is not None:
print result
print(result)
else:
if result is None:
result = "No Output"
Expand Down
2 changes: 1 addition & 1 deletion pylms/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def sync_to(self, other_player_ref):

def unsync(self):
"""Unsync player"""
self.request("sync -")
self.request("sync -")

def __quote(self, text):
try:
Expand Down
6 changes: 3 additions & 3 deletions pylms/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
s = server.Server("10.0.2.10")
s.connect()

print s.get_players()
print(s.get_players())

p = s.get_player("Lounge")
p.set_volume(10)

r = s.request("songinfo 0 100 track_id:94")
print r
print(r)

r = s.request("trackstat getrating 1019")
print r
print(r)

0 comments on commit 912cf19

Please sign in to comment.