summaryrefslogtreecommitdiff
path: root/test/test-clock
blob: c086ffc670545e9862b282824201a7d49cbb5f92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python

import dbus

bus = dbus.SystemBus()

clock = dbus.Interface(bus.get_object("net.connman", "/"),
					"net.connman.Clock")

properties = clock.GetProperties()

for key in list(properties.keys()):
	if key in ["Timeservers"]:
		list = ""
		for val in properties[key]:
			list = list + val + " "
		print("%s = [ %s]" % (key, list))
	else:
		print("%s = %s" % (key, properties[key]))