summaryrefslogtreecommitdiffstats
path: root/test/test-modem
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2014-03-11 17:39:18 +0100
committerDenis Kenzior <denkenz@gmail.com>2014-03-11 19:32:18 -0500
commit0c1fcd2b50908bda607fce70c796033e33832b11 (patch)
tree05af7c047cdb39229efd344bba4aa2198ea9105c /test/test-modem
parentc54e4763f8f4f6239a778994cf68f077ad2b170d (diff)
downloadofono-0c1fcd2b50908bda607fce70c796033e33832b11.tar.bz2
test: Make print calls compatible with Python 3
Turn print calls into print() function calls and avoid using comma-separated arguments, so that they work and look the same with both Python 2 and 3.
Diffstat (limited to 'test/test-modem')
-rwxr-xr-xtest/test-modem28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/test-modem b/test/test-modem
index c91caa3c..e4dd6bd6 100755
--- a/test/test-modem
+++ b/test/test-modem
@@ -6,7 +6,7 @@ import dbus
import dbus.mainloop.glib
def property_changed(name, value):
- print "Modem property %s changed to %s" % (name, value)
+ print("Modem property %s changed to %s" % (name, value))
if __name__ == "__main__":
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -25,41 +25,41 @@ if __name__ == "__main__":
properties = modem.GetProperties()
if properties.has_key('Name'):
- print "Name: %s" % (properties['Name'])
+ print("Name: %s" % (properties['Name']))
if properties.has_key('Manufacturer'):
- print "Manufacturer: %s" % (properties['Manufacturer'])
+ print("Manufacturer: %s" % (properties['Manufacturer']))
if properties.has_key('Model'):
- print "Model: %s" % (properties['Model'])
+ print("Model: %s" % (properties['Model']))
if properties.has_key('Revision'):
- print "Revision: %s" % (properties['Revision'])
+ print("Revision: %s" % (properties['Revision']))
if properties.has_key('Serial'):
- print "Serial: %s" % (properties['Serial'])
+ print("Serial: %s" % (properties['Serial']))
if properties.has_key('Powered'):
- print "Powered: %s" % (properties['Powered'])
+ print("Powered: %s" % (properties['Powered']))
if properties.has_key('Online'):
- print "Online: %s" % (properties['Online'])
+ print("Online: %s" % (properties['Online']))
if properties.has_key('Lockdown'):
- print "Lockdown: %s" % (properties['Lockdown'])
+ print("Lockdown: %s" % (properties['Lockdown']))
if properties.has_key('Emergency'):
- print "Emergency: %s" % (properties['Emergency'])
+ print("Emergency: %s" % (properties['Emergency']))
if properties.has_key('Features'):
- print "Features:"
+ print("Features:")
for feature in properties["Features"]:
- print " [ %s ]" % (feature)
+ print(" [ %s ]" % (feature))
if properties.has_key('Interfaces'):
- print "Interfaces:"
+ print("Interfaces:")
for interface in properties["Interfaces"]:
- print " [ %s ]" % (interface)
+ print(" [ %s ]" % (interface))
mainloop = gobject.MainLoop()
mainloop.run()