ctdb/utils/etcd/ctdb_etcd_lock python => python3

Martin Schwenke martin at meltin.net
Fri Apr 23 10:59:58 UTC 2021


On Thu, 22 Apr 2021 14:09:54 +0200, "L.P.H. van Belle via
samba-technical" <samba-technical at lists.samba.org> wrote:

> Latest samba build failed on ctdb. 

How exactly does the build fail?

> I dont know if its really needed but all python references are used
> with /usr/bin/env python3. 
> Just to besure im not breaking something in ctdb here. 
> Can someone confirm this? 
> My fix.
> --- a/ctdb/utils/etcd/ctdb_etcd_lock
> +++ b/ctdb/utils/etcd/ctdb_etcd_lock
> @@ -1,4 +1,4 @@
> -#!/usr/bin/python
> +#!/usr/bin/env python3

I'd like to be able to give a better answer but I'm not entirely sure
that the script works with python3 without any other changes.  It looks
like it should but I don't have a trivial way of testing it (or time to
setup a test environment).

Given that /usr/bin/python isn't supported anymore, we might as well
change it as above see what bug reports get generated.

If you're keen to improve the script then you could try to clean it up
and get rid of warnings from pylint and flake8.  getting rid of the
obvious whitespace issues might make any python3 issues more obvious.
Perhaps yapf3 would be useful?

peace & happiness,

More information about the samba-technical mailing list