librpc/spoolss fixes for Samba 4

Jelmer Vernooij jelmer at samba.org
Tue Dec 27 07:04:27 MST 2011


Hi Fabio,

Am 27/12/11 13:49, schrieb Fábio Ramon:
> I'm coding some bugs fixes for the Samba4 python version of librpc spoolss
> and I would like to share it. I also would like to discuss a minor feature
> in python error handler. Is someone working in this component?
I think Guenther and Andreas did most recent work on the spoolss 
interface. I'm mainly involved in the Python backend for pidl.
> [PATCH 5/6] pidl: Supports converting string_array type
> I decided to put the funcions on that file because of
> existing PyString_FromStringOrNULL.
I'm a bit reluctant to make string_array more special than it already 
is. pidl really shouldn't know anything about string_array, and its IDL 
file should contain the right magic (using transform_as) to convert it 
to an actual string array. That way we won't need special handling in 
each pidl backend.

For the moment, it seems reasonable to add this as I'm not sure how long 
it will take before things like transform_as will work properly.
> [PATCH 6/6] pidl: Add error information on Python Exception
> Can this feature break the Samba Python API
I don't think it breaks the API, but it's the wrong thing to do. The 
result variable is still incomplete at the point the exception is 
raised. If the condition is not fatal and partially succeeded, we 
shouldn't be raising an exception in the first place. Can you explain 
why you need this?

Cheers,

Jelmer


More information about the samba-technical mailing list