The Samba-Bugzilla – Attachment 15004 Details for
Bug 13837
Samba 4.9.5 - Error on samba-tool with python 2.6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for 4.10, with reviewed-by tags
douglas-fixes-python-2.6-problems-for-the-last-time-4-10.patch (text/plain), 4.36 KB, created by
Douglas Bagnall
on 2019-03-27 04:17:39 UTC
(
hide
)
Description:
Patches for 4.10, with reviewed-by tags
Filename:
MIME Type:
Creator:
Douglas Bagnall
Created:
2019-03-27 04:17:39 UTC
Size:
4.36 KB
patch
obsolete
>From 73e8685c9eb55b38060dfd6297c3c8bb1e37e392 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 20 Mar 2019 12:02:09 +1300 >Subject: [PATCH 1/4] py/graph: use 2.6 compatible check for set membership > >It is better this way anyway. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13837 >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Wed Mar 20 06:36:05 UTC 2019 on sn-devel-144 > >(cherry picked from commit c0aca17a4c9ec06f0127d5c972f3fa979a87a77f) >--- > python/samba/graph.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/python/samba/graph.py b/python/samba/graph.py >index 0a0aecd6631..c8d5f9230d0 100644 >--- a/python/samba/graph.py >+++ b/python/samba/graph.py >@@ -88,7 +88,7 @@ def shorten_vertex_names(vertices, suffix=',...', aggressive=False): > try: > while True: > c = set(x[i] for x in vlist) >- if len(c) > 1 or c == {'*'}: >+ if len(c) > 1 or '*' in c: > break > i -= 1 > except IndexError: >-- >2.17.1 > > >From f20ac5d07d09478f05313b592536d9c606df5e89 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Fri, 22 Mar 2019 15:24:47 +1300 >Subject: [PATCH 2/4] py/kcc_utils: py2.6 compatibility > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13837 >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >--- > python/samba/kcc/kcc_utils.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py >index 81d381abd99..ef4d706c8e2 100644 >--- a/python/samba/kcc/kcc_utils.py >+++ b/python/samba/kcc/kcc_utils.py >@@ -31,7 +31,7 @@ from samba.dcerpc import ( > ) > from samba.common import dsdb_Dn > from samba.ndr import ndr_unpack, ndr_pack >-from collections import Counter >+from collections import defaultdict > > > class KCCError(Exception): >@@ -2288,7 +2288,7 @@ def uncovered_sites_to_cover(samdb, site_name): > scope=ldb.SCOPE_SUBTREE, > expression="(objectClass=site)") > >- sites_in_use = Counter() >+ sites_in_use = defaultdict(int) > dc_count = 0 > > # Assume server is of form DC,Servers,Site-ABCD because of schema >-- >2.17.1 > > >From de3b7b8f35b0f56ffaf41373923766cf2afe5e50 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 20 Mar 2019 12:12:34 +1300 >Subject: [PATCH 3/4] py/uptodateness: use 2.6 compatible dictionary > construction > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13837 >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >--- > python/samba/uptodateness.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/python/samba/uptodateness.py b/python/samba/uptodateness.py >index 3964bd7d6db..ced902bb3e4 100644 >--- a/python/samba/uptodateness.py >+++ b/python/samba/uptodateness.py >@@ -194,6 +194,6 @@ def get_utdv_summary(distances, filters=None): > } > > if filters: >- return {key: summary[key] for key in filters} >+ return dict((key, summary[key]) for key in filters) > else: > return summary >-- >2.17.1 > > >From c377b0e89e8d61eccd6877ed6555b7ce0afdd8b0 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Wed, 27 Mar 2019 09:47:56 +1300 >Subject: [PATCH 4/4] py/logger: use python 2.6 compatible arguments > >In 2.6 stream is a positional argument; 2.7+ it is also a keyword >argument. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13837 >Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Reviewed-by: Garming Sam <garming@catalyst.net.nz> >--- > python/samba/logger.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/python/samba/logger.py b/python/samba/logger.py >index 667c6487a51..b54268a628c 100644 >--- a/python/samba/logger.py >+++ b/python/samba/logger.py >@@ -62,7 +62,7 @@ def get_samba_logger( > Formatter = logging.Formatter > formatter = Formatter(fmt=fmt, datefmt=datefmt) > >- handler = logging.StreamHandler(stream=stream) >+ handler = logging.StreamHandler(stream) > handler.setFormatter(formatter) > logger.addHandler(handler) > >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
garming
:
review+
Actions:
View
Attachments on
bug 13837
:
14952
|
14953
|
14976
|
14983
|
14993
|
14994
|
15002
|
15003
| 15004