Is there a mistake in the samba.smb.SMB PyDoc stuff?

Jelmer Vernooij jelmer at samba.org
Sat Mar 24 19:45:15 MDT 2012


Am 25/03/12 03:20, schrieb Richard Sharpe:
> Hi,
>
> It says:
>
> samba.smb.SMB = class SMB(talloc.Object)
>  |  SMB(hostname, service[, lp[, creds]]) -> SMB connection object
>  |
>
> However, in my code, if I do
>
>     conn = smb.SMB(server, share, lp=lp, creds=creds)
>
> It I don't have lp=lp, creds=creds (ie, if I just have smb.SMB(server,
> share, lp, creds)) I get an error saying invalid type.
>
> I guess I will try it the other way around and see what I get.
>
> Anyway, it just works, and it has been easy getting to point of
> setting up a connection.
There is a bug in the docstring. See ./source4/libcli/pysmb.c line 463
for the actual list of arguments.

>~~~const char *kwnames[] = { "hostname", "service", "creds", "lp", NULL };

creds is supposed to be before lp.

Cheers,

Jelmer


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120325/aabe8290/attachment.pgp>


More information about the samba-technical mailing list