Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/lib/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/lib/bpickle_dbus.pyc

ó
ÍÿŠTc@sSdZddlZddlmZd„Zd„Zd„Zd„Zd„ZdS(	s
Different versions of the Python DBus bindings return different types
to represent integers, strings, lists, etc.  Older versions return
builtin Python types: C{int}, C{str}, C{list}, etc.  Newer versions
return DBus-specific wrappers: C{Int16}, C{String}, C{Array}, etc.
Failures occur when DBus types are used because bpickle doesn't know
that an C{Int16} is really an C{int} and that an C{Array} is really a
C{list}.

L{install} and L{uninstall} can install and remove extensions that
make bpickle work with DBus types.
iÿÿÿÿN(tbpicklecCs+x$tƒD]\}}|tj|<q
WdS(s*Install bpickle extensions for DBus types.N(tget_dbus_typesRtdumps_table(ttypetfunction((s>/usr/lib/python2.7/dist-packages/landscape/lib/bpickle_dbus.pytinstallscCs(x!tƒD]\}}tj|=q
WdS(s,Uninstall bpickle extensions for DBus types.N(RRR(RR((s>/usr/lib/python2.7/dist-packages/landscape/lib/bpickle_dbus.pyt	uninstallscCsdt|ƒ|fS(sm
    Convert the specified L{dbus.types.UTF8String} to bpickle's
    representation for C{unicode} data.
    su%s:%s(tlen(tobj((s>/usr/lib/python2.7/dist-packages/landscape/lib/bpickle_dbus.pytdumps_utf8stringscCsdt|ƒS(sK
    Convert a dbus.types.Double into a floating point representation.
    sf%r;(tfloat(R((s>/usr/lib/python2.7/dist-packages/landscape/lib/bpickle_dbus.pytdumps_double'sc
csÔxÍdtjfdtjfdtjfdtjfdtjfdtjfdtjfdtfd	tjfd
tjfdtjfdtfgD];\}}tt	j
|d
ƒ}|d
k	r‘||fVq‘q‘Wd
S(sT
    Generator yields C{(type, bpickle_function)} for available DBus
    types.
    tBooleantInt16tUInt16tInt32tUInt32tInt64tUInt64tDoubletArrayt
DictionarytStringt
UTF8StringN(Rt
dumps_boolt	dumps_intRt
dumps_listt
dumps_dictt
dumps_unicodeR	tgetattrtdbusttypestNone(t	type_nameRR((s>/usr/lib/python2.7/dist-packages/landscape/lib/bpickle_dbus.pyR.s	(	t__doc__Rt
landscape.libRRRR	RR(((s>/usr/lib/python2.7/dist-packages/landscape/lib/bpickle_dbus.pyt<module>s