~ubuntu-branches/ubuntu/lucid/landscape-client/lucid-updates

« back to all changes in this revision

Viewing changes to landscape/lib/bpickle_dbus.py

  • Committer: Package Import Robot
  • Author(s): Andreas Hasenack
  • Date: 2012-04-10 14:28:48 UTC
  • mfrom: (1.1.27)
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: package-import@ubuntu.com-20120410142848-7xsy4g2xii7y7ntc
ImportĀ upstreamĀ versionĀ 12.04.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    """
36
36
    return "u%s:%s" % (len(obj), obj)
37
37
 
 
38
 
38
39
def dumps_double(obj):
39
40
    """
40
41
    Convert a dbus.types.Double into a floating point representation.
41
42
    """
42
43
    return "f%r;" % float(obj)
43
44
 
 
45
 
44
46
def get_dbus_types():
45
47
    """
46
48
    Generator yields C{(type, bpickle_function)} for available DBus
57
59
                                  ("Array", bpickle.dumps_list),
58
60
                                  ("Dictionary", bpickle.dumps_dict),
59
61
                                  ("String", bpickle.dumps_unicode),
60
 
                                  ("UTF8String", dumps_utf8string),]:
 
62
                                  ("UTF8String", dumps_utf8string)]:
61
63
        type = getattr(dbus.types, type_name, None)
62
64
        if type is not None:
63
65
            yield type, function