search for: kwarg

Displaying 20 results from an estimated 1456 matches for "kwarg".

Did you mean: kwargs
2019 Nov 22
1
Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.
...it could >>>> look like: >>>> >>>> def zero(h, count, offset, may_trim=False, fua=False, fast=False): >>> >>> This is nicer - but not extensible. >> >> Why not? Any future flag additions would still appear as new key=value >> kwargs. > > Because there is no **kwargs argument, you will get TypeError when adding new > argument. We will need new api version whenever we add new argument. Not if you use PyObject_Call(fn, args, kwargs) or similar to pass 'may_trim=False' as a kwarg instead of a positional. As l...
2019 Nov 21
5
Extending the nbdkit python plugin
...given One possibility is that we could introspect the plugin to find out how many parameters it takes. This is possible, but very difficult from C. (See https://stackoverflow.com/a/41188411 for how to do it from Python). Another possibility is we could encourage existing Python plugins to add **kwargs to all functions where we might plausibly add extra parameters in future, ie. the above would become: def pwrite (h, buf, offset, **kwargs): This still requires all Python plugins to change, but at least they would remain backwards compatible with old and new nbdkit. However I couldn't ac...
2015 Jan 19
8
Slow ldap authentication against samba 4
hi everyone... somebody has experimented any problems with poor performance about ldap authentication against samba 4? I'm trying authentication with 300 users and many users can't login. Some conections are rejected. I doesn't found anything searching on internet. Any help? -- Grato, Jefferson Parreira dos Santos Emerick
2018 Apr 11
0
[nbdkit PATCH v2 4/5] python: Expose FUA support
..._pread (void *handle, void *buf, return 0; } +static int py_flush (void *handle, uint32_t flags); + static int py_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, uint32_t flags) { PyObject *obj = handle; PyObject *fn; + PyObject *args; + PyObject *kwargs; PyObject *r; + int fua = (flags & NBDKIT_FLAG_FUA) != 0; + int need_flush = fua && !pwrite_has_fua; - assert (!flags); + assert (!(flags & ~NBDKIT_FLAG_FUA)); if (callback_defined ("pwrite", &fn)) { PyErr_Clear (); - r = PyObject_CallFunction (fn,...
2015 Aug 13
1
Slow ldap authentication against samba 4
...t;>> *import ldap* >>>> *from threading import Thread* >>>> *import time* >>>> *import sys* >>>> * >>>> * >>>> *class LDAPTtryThread(Thread):* >>>> * >>>> * >>>> * def __init__(self, **kwargs):* >>>> * Thread.__init__(self)* >>>> *self.id <http://self.id> = kwargs.get('id')* >>>> * self.host = kwargs.get('host')* >>>> * self.username = kwargs.get('username')* >>>> * self.passwo...
2019 Nov 25
6
[nbdkit PATCH 0/5] Counterproposal for python v2 interfaces
As mentioned in my reviews, I wonder if we should make our python callbacks look a bit more Pythonic by having kwargs added for each new flag that we want to expose. The idea was first floated here: https://www.redhat.com/archives/libguestfs/2018-April/msg00108.html Note that with my proposal, there is no need for a python script to expose a global API_VERSION variable; new flags are added using a Python API t...
2019 Nov 22
4
Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.
...and for zero (once fast zero is supported later in the series), it could >> look like: >> >> def zero(h, count, offset, may_trim=False, fua=False, fast=False): > > This is nicer - but not extensible. Why not? Any future flag additions would still appear as new key=value kwargs. > >> The user could also write: >> >> def zero(h, count, offset, **flags) > > This is less nice, but easy to extend without adding v3. But I would > call it **options > instead. I really need to post my patches where I played with kwargs, for contrast to this...
2008 Aug 18
3
FXRuby FXScintilla question
Hello, I have started learning FXRuby about 2 weeks ago. Now I''m trying to launch the scintilla_test.rb from the fxruby-1.6 installation directory (/usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/examples) and get this error: /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in `old_initialize'': wrong number of arguments (8 for 0) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/fxruby-1.6.16/lib/fox16/kwargs.rb:2007:in `initialize'' from -:32:in `new'' from -:32:in `initialize'' from -:75:in `new'' from -:75 Exit...
2018 Aug 22
1
Cannot find KDC for requested realm
...#39;ad.firma.andrick.de', 'ad', 'A', '192.168.4.53'] ERROR(runtime): uncaught exception - (9711, 'WERR_DNS_ERROR_RECORD_ALREADY_EXISTS')   File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 176, in _run     return self.run(*args, **kwargs)   File "/usr/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 940, in run     raise e Failed 'samba-tool dns' based update of A ad.ad.firma.andrick.de 192.168.4.53 update (samba-tool): AAAA ad.ad.firma.andrick.de fd35:4534:20ac:0:200:ff:fe00:5 Calling samba-tool dns for...
2018 Aug 22
1
Samba 4.8.4 + BIND 9.9.4 - possibility of nonsecure DNS updates
...39;samdom.svmetal.cz', 'dc03x', 'A', '192.168.45.1'] ERROR(runtime): uncaught exception - (9711, 'WERR_DNS_ERROR_RECORD_ALREADY_EXISTS') File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 176, in _run return self.run(*args, **kwargs) File "/usr/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 940, in run raise e Failed 'samba-tool dns' based update of A dc03x.samdom.svmetal.cz 192.168.45.1 update (samba-tool): NS samdom.svmetal.cz dc03x.samdom.svmetal.cz Calling samba-tool dns for NS samdom.svm...
2015 Jan 20
0
Slow ldap authentication against samba 4
...ira dos Santos Emerick wrote: > ? Yeah.. I wrote a simple script in python to test it. Here is the scrit: > > *import ldap* > *from threading import Thread* > *import time* > *import sys* > * > * > *class LDAPTtryThread(Thread):* > * > * > * def __init__(self, **kwargs):* > * Thread.__init__(self)* > *self.id <http://self.id> = kwargs.get('id')* > * self.host = kwargs.get('host')* > * self.username = kwargs.get('username')* > * self.password = kwargs.get('password')* > * self.timeou...
2015 Aug 13
0
Slow ldap authentication against samba 4
.... Here is the scrit: >>> >>> *import ldap* >>> *from threading import Thread* >>> *import time* >>> *import sys* >>> * >>> * >>> *class LDAPTtryThread(Thread):* >>> * >>> * >>> * def __init__(self, **kwargs):* >>> * Thread.__init__(self)* >>> *self.id <http://self.id> = kwargs.get('id')* >>> * self.host = kwargs.get('host')* >>> * self.username = kwargs.get('username')* >>> * self.password = kwargs.get('...
2018 Sep 10
2
samba 4.7.6-Ubuntu + ipv6 not work bind9-DLZ
...;freewaynet.corp', 'agamenon', 'A', '192.168.1.252'] ERROR(runtime): uncaught exception - (9711, 'WERR_DNS_ERROR_RECORD_ALREADY_EXISTS') File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 176, in _run return self.run(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/samba/netcmd/dns.py", line 940, in run raise e Failed 'samba-tool dns' based update of A agamenon.freewaynet.corp 192.168.1.252 update (samba-tool): AAAA agamenon.freewaynet.corp 2001:db8:3:0:20c:29ff:fecb:5299 Calling samba-tool dn...
2018 Apr 11
10
[nbdkit PATCH v2 0/5] FUA support in Python scripts
First out of our four language bindings to add FUA support (for reference, I added 'zero' support for python, perl, and ruby back in 1.1.13, then Rich had to add it for ocaml in 1.1.20). I tested this heavily under python 2, but for now only compile tested under python 3; I plan to do further testing there and make any tweaks if necessary. I wrote patch 5 early on, but then realized I
2015 Feb 27
8
samba-tool time
...me.fqdn ? when i run it, im getting : ? ERROR(runtime): uncaught exception - Connection to SRVSVC pipe of server 'rotterdam.bazuin.nl' failed: NT_STATUS_NONE_MAPPED ? File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run ??? return self.run(*args, **kwargs) ? File "/usr/lib/python2.7/dist-packages/samba/netcmd/time.py", line 59, in run ??? self.outf.write(net.time(server_name)+"\n") ? Greetz, ? Louis ?
2019 Sep 06
1
could not create snapshotxml on encryption image
...st recent call last): File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py",line 4613, in snapshot self._dom,snapshotCreateXML(snapxml, snapFlags) File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", in line 98, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 130, in wrapper ret = f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 92, in wrapper return func(inst, *args, **kwargs) File "/usr/lib64...
2019 Oct 05
2
Emulated TPM doesn't work on Debian Buster
...is Debian stable with standard packages. Error starting domain: Unable to find 'swtpm' binary in $PATH: No such file or directory Traceback (most recent call last): ? File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper ??? callback(asyncjob, *args, **kwargs) ? File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb ??? callback(*args, **kwargs) ? File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 66, in newfn ??? ret = fn(self, *args, **kwargs) ? File "/usr/share/virt-manager/virtManager/doma...
2018 Apr 11
0
[nbdkit PATCH v2 1/5] python: Let zero's may_trim parameter be optional
...a default for the parameter (although we do now recommend that plugins provide a default value, as it makes plugins built against newer nbdkit more likely to run even on older nbdkit, although that's not the direction we typically guarantee). We can't see through a plugin that used '**kwargs', but that is less likely. If we are super-worried about back-compatibility to older plugins which hard-coded 4 required parameters, we could also tweak the introspection to assume that a 'zero' with 4 parameters and no defaults, where we do not recognize the fourth parameter name, is...
2010 Aug 18
16
[PATCH 00 of 16] libxl: autogenerate type definitions and destructor functions
The series introduces auto-generation of the type definitions used in the libxl interface followed by auto-generation of a destructor function for each type. In the future it may be possible to use the related data structures for other purposes, for example auto-generation of the functions to marshal between C and language binding data types. tools/_libxl_types.h should be identical both before
2016 Nov 16
1
BroadCom NIC not adding as PassThrough device
...getting following error. Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 124, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in newfn ret = fn(self, *args, **kwargs) File "/usr/share/virt-manager/virtManager...