<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source4/scripting/bin/samba-tool, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>samba-tool: binary uses samba_tool function</title>
<updated>2022-09-08T22:34:36+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2022-09-07T22:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=4bfcd16a3c6af3fc21d9c57f8fbdb2ea5fd15f25'/>
<id>4bfcd16a3c6af3fc21d9c57f8fbdb2ea5fd15f25</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba-tool: command that has exception, shows exception</title>
<updated>2022-09-08T22:34:36+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2022-09-07T20:56:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=153ad8fc3a90446fe25108a8ba4f41812e9b2462'/>
<id>153ad8fc3a90446fe25108a8ba4f41812e9b2462</id>
<content type='text'>
This will make a difference to the string printed in the cases that
call self.usage(), resulting in more specified usage for the
sub-command. It would also matter if the samba-tool sub-command had a
different .show_command_error() or .errf, but I don't think that
happens.

Note: usually command._run() will have caught and shown the exception,
returning -1.

We also rename away 'cmd' so we don't again imagine it is the command
we are running.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will make a difference to the string printed in the cases that
call self.usage(), resulting in more specified usage for the
sub-command. It would also matter if the samba-tool sub-command had a
different .show_command_error() or .errf, but I don't think that
happens.

Note: usually command._run() will have caught and shown the exception,
returning -1.

We also rename away 'cmd' so we don't again imagine it is the command
we are running.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba-tool: separate ._run() from command resolution</title>
<updated>2022-09-08T22:34:36+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2022-09-07T03:34:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9ec0863ff244494ba1b3fdc1b2d3be38e195e146'/>
<id>9ec0863ff244494ba1b3fdc1b2d3be38e195e146</id>
<content type='text'>
Prior to this commit, in super-commands, the first half of the _run()
is resolving what sub-command to run, and the second half is working
out what to print if that failed. Some issues with that are:

 * it looks a little bit complicated.

 * the tests can't use the tool's resolution code, because it runs
   immediately, while the tests first want to fiddle with self.outf
   and so on.

 * it makes it harder to subclass and override the resolution code, so
   instead we do strange things like where we subclass dict as in
   main.py.

So we split it into ._resolve() and ._run().

There are a few tests that break. We mark these as flapping, rather
than knownfail, so as to avoid going into extremely fine-grain filters
for tests that will be fixed within a few commits.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this commit, in super-commands, the first half of the _run()
is resolving what sub-command to run, and the second half is working
out what to print if that failed. Some issues with that are:

 * it looks a little bit complicated.

 * the tests can't use the tool's resolution code, because it runs
   immediately, while the tests first want to fiddle with self.outf
   and so on.

 * it makes it harder to subclass and override the resolution code, so
   instead we do strange things like where we subclass dict as in
   main.py.

So we split it into ._resolve() and ._run().

There are a few tests that break. We mark these as flapping, rather
than knownfail, so as to avoid going into extremely fine-grain filters
for tests that will be fixed within a few commits.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PY3: change shebang to python3 in source4/scripting/bin dir</title>
<updated>2018-12-14T13:40:20+00:00</updated>
<author>
<name>Joe Guo</name>
<email>joeg@catalyst.net.nz</email>
</author>
<published>2018-12-10T23:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a19d5bd771c1727b037d28d24af0b85e49bdafb2'/>
<id>a19d5bd771c1727b037d28d24af0b85e49bdafb2</id>
<content type='text'>
Samba default python is 3 now.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Samba default python is 3 now.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>source4/scripting python: convert 'except X, e' to 'except X as e'</title>
<updated>2018-02-14T23:18:30+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2018-02-13T21:33:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f43cb7c38d1945cdeca259b53a433c68803482d0'/>
<id>f43cb7c38d1945cdeca259b53a433c68803482d0</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s4-python: Override SIGINT handler in scripts only.</title>
<updated>2012-09-25T18:59:09+00:00</updated>
<author>
<name>Jelmer Vernooij</name>
<email>jelmer@samba.org</email>
</author>
<published>2012-09-25T18:49:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=fa332b71dc71d23f1475ed6c25a6376934ab652a'/>
<id>fa332b71dc71d23f1475ed6c25a6376934ab652a</id>
<content type='text'>
Override the SIGINT handler in a few select cases only, rather than
doing so in one of the samba Python modules. I've done this where it
matters most; we can add this code to other scripts too if necessary.

This means that importing the 'samba' module from a third party
application does not have side-effects on the state of the signal
handlers.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9068
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Override the SIGINT handler in a few select cases only, rather than
doing so in one of the samba Python modules. I've done this where it
matters most; we can add this code to other scripts too if necessary.

This means that importing the 'samba' module from a third party
application does not have side-effects on the state of the signal
handlers.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9068
</pre>
</div>
</content>
</entry>
<entry>
<title>s4:samba-tool: allow sys.exit(ret) to control the exit code</title>
<updated>2012-09-11T06:23:55+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2012-09-11T06:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=475755ef9ff5f39ba499de8f30c23efcce10ba0c'/>
<id>475755ef9ff5f39ba499de8f30c23efcce10ba0c</id>
<content type='text'>
Some subcommands may use sys.exit(0), which shouldn't be reported
as an error to the caller.

metze
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some subcommands may use sys.exit(0), which shouldn't be reported
as an error to the caller.

metze
</pre>
</div>
</content>
</entry>
<entry>
<title>samba-tool: Move main command implementation to samba.netcmd.main, so it is accessible by the testsuite.</title>
<updated>2011-10-13T22:22:57+00:00</updated>
<author>
<name>Jelmer Vernooij</name>
<email>jelmer@samba.org</email>
</author>
<published>2011-10-13T21:36:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9e1ef61b34b7a4ec63d5bf58e50e64af16a24c43'/>
<id>9e1ef61b34b7a4ec63d5bf58e50e64af16a24c43</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>netcmd: Add errf stream to command instances.</title>
<updated>2011-10-12T22:23:39+00:00</updated>
<author>
<name>Jelmer Vernooij</name>
<email>jelmer@samba.org</email>
</author>
<published>2011-10-12T21:19:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=63c9186e92ae2c7f1f7383352cc95d38b2efc45a'/>
<id>63c9186e92ae2c7f1f7383352cc95d38b2efc45a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>s4-python: Consistently use spaces rather than tabs, fix headers in several places.</title>
<updated>2011-09-13T00:24:03+00:00</updated>
<author>
<name>Jelmer Vernooij</name>
<email>jelmer@samba.org</email>
</author>
<published>2011-09-12T23:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=df1d3dc777b48bc9bc10f3eb44dec90db490a899'/>
<id>df1d3dc777b48bc9bc10f3eb44dec90db490a899</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
