~kvalo/connman/bug-734339

« back to all changes in this revision

Viewing changes to test/list-services

  • 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:
2
2
 
3
3
import dbus
4
4
 
 
5
def extract_values(values):
 
6
        val = "{"
 
7
        for key in values.keys():
 
8
                val += " " + key + "="
 
9
                val += str(values[key])
 
10
        val += " }"
 
11
        return val
 
12
 
5
13
bus = dbus.SystemBus()
6
14
 
7
15
manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
18
26
        print "[ %s ]" % (path)
19
27
 
20
28
        for key in properties.keys():
21
 
                if key in ["Strength"]:
 
29
                if key in ["IPv4", "IPv4.Configuration", "Ethernet"]:
 
30
                        val = extract_values(properties[key])
 
31
                elif key in ["Favorite", "Immutable", "AutoConnect",
 
32
                                "SetupRequired", "PassphraseRequired"]:
 
33
                        if properties[key] == dbus.Boolean(1):
 
34
                                val = "true"
 
35
                        else:
 
36
                                val = "false"
 
37
                elif key in ["Strength"]:
22
38
                        val = int(properties[key])
23
39
                else:
24
40
                        val = str(properties[key])