~shakaran/ubuntu/quantal/connman/bug-pattern-update

« back to all changes in this revision

Viewing changes to test/list-connections

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel
  • Date: 2010-02-12 10:08:03 UTC
  • mfrom: (1.1.8 upstream) (0.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100212100803-s8iaj8g1dmgwm2uz
Tags: 0.48+dfsg-2
* Ubuntu/Debian sync upload
* Re-add missing changes from 0.45+dfsg that made it only in Ubuntu:
  - ship development parts in a connman-dev package (Closes: 546616)
    - add debian/connman-dev.install
    - update debian/control
* Update long descriptions for connman and connman-dev
  - update debian/control
* Add missing Depends on libglib2.0-dev, libdbus-1-dev for connman-dev
  - update debian/control
* Don't run bootstrap twice during build.
  - update debian/rules
* Remove old configure option: enable-ppp, with-pppd, enable-novatel,
  enable-huawei and enable-modemmgr are no longer recognized.
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
 
3
 
import dbus
4
 
 
5
 
bus = dbus.SystemBus()
6
 
 
7
 
manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
8
 
                                        "org.moblin.connman.Manager")
9
 
 
10
 
properties = manager.GetProperties()
11
 
 
12
 
for path in properties["Connections"]:
13
 
        connection = dbus.Interface(bus.get_object("org.moblin.connman", path),
14
 
                                                "org.moblin.connman.Connection")
15
 
 
16
 
        properties = connection.GetProperties()
17
 
 
18
 
        print "[ %s ]" % (path)
19
 
 
20
 
        for key in properties.keys():
21
 
                if key in ["Strength", "Priority"]:
22
 
                        val = int(properties[key])
23
 
                else:
24
 
                        val = str(properties[key])
25
 
                print "    %s = %s" % (key, val)
26
 
 
27
 
        print