mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Removed depreciated xmlrpc_marshal() and xmlrpc_unmarshal() functions
This commit is contained in:
committed by
Rob Crittenden
parent
336c4c2caf
commit
18cecdc515
@@ -32,33 +32,6 @@ from xmlrpclib import Binary
|
||||
import krbV
|
||||
|
||||
|
||||
|
||||
def xmlrpc_marshal(*args, **kw):
|
||||
"""
|
||||
Marshal (args, kw) into ((kw,) + args).
|
||||
"""
|
||||
kw = dict(
|
||||
filter(lambda item: item[1] is not None, kw.iteritems())
|
||||
)
|
||||
args = tuple(
|
||||
filter(lambda value: value is not None, args)
|
||||
)
|
||||
return ((kw,) + args)
|
||||
|
||||
|
||||
def xmlrpc_unmarshal(*params):
|
||||
"""
|
||||
Unmarshal (params) into (args, kw).
|
||||
"""
|
||||
if len(params) > 0:
|
||||
kw = params[0]
|
||||
if type(kw) is not dict:
|
||||
raise TypeError('first xmlrpc argument must be dict')
|
||||
else:
|
||||
kw = {}
|
||||
return (params[1:], kw)
|
||||
|
||||
|
||||
def get_current_principal():
|
||||
try:
|
||||
return krbV.default_context().default_ccache().principal().name
|
||||
|
||||
Reference in New Issue
Block a user