Python2 to Python3 conversion using 2to3

This commit is contained in:
Philipp Weissmann 2014-10-02 09:52:26 +02:00
parent 2986793345
commit 4f2e92c6e0

View file

@ -181,20 +181,20 @@ def main():
contents = dev.content contents = dev.content
if command_line.longlist: if command_line.longlist:
print "-"*30 print("-"*30)
print contents["name"] print(contents["name"])
for x in contents: for x in contents:
print "%20s - %s" % (x, contents[x]) print("%20s - %s" % (x, contents[x]))
elif command_line.list: elif command_line.list:
# print "\n" # print "\n"
print "-"*30 print("-"*30)
print "Name - %s" % contents["name"] print("Name - %s" % contents["name"])
print "Display Name - %s" % contents["deviceDisplayName"] print("Display Name - %s" % contents["deviceDisplayName"])
print "Location - %s" % contents["location"] print("Location - %s" % contents["location"])
print "Battery Level - %s" % contents["batteryLevel"] print("Battery Level - %s" % contents["batteryLevel"])
print "Battery Status- %s" % contents["batteryStatus"] print("Battery Status- %s" % contents["batteryStatus"])
print "Device Class - %s" % contents["deviceClass"] print("Device Class - %s" % contents["deviceClass"])
print "Device Model - %s" % contents["deviceModel"] print("Device Model - %s" % contents["deviceModel"])
# Play a Sound on a device # Play a Sound on a device
if command_line.sound: if command_line.sound: