Fix resource leak
[platform/upstream/connman.git] / test / test-clock
1 #!/usr/bin/python
2
3 import dbus
4
5 bus = dbus.SystemBus()
6
7 clock = dbus.Interface(bus.get_object("net.connman", "/"),
8                                         "net.connman.Clock")
9
10 properties = clock.GetProperties()
11
12 for key in list(properties.keys()):
13         if key in ["Timeservers"]:
14                 list = ""
15                 for val in properties[key]:
16                         list = list + val + " "
17                 print("%s = [ %s]" % (key, list))
18         else:
19                 print("%s = %s" % (key, properties[key]))