[Pkg-samba-maint] Bug#964165: small fix.
L.P.H. van Belle
belle at bazuin.nl
Fri Jul 3 07:38:22 BST 2020
The fix : Temp-fix-is-is-litteral.patch
>From David Disseldorp via samba-technical
See https://bugs.python.org/issue34850
the "is" and "is not" operator sometimes is used with string and
numerical literals. This code "works" on CPython by accident, because
of caching on different levels (small integers and strings caches,
interned strings, deduplicating constants at compile time). But it
shouldn't work on other implementations, and can not work even on
early or future CPython versions.
It can be ignored, but we should probably fix all such cases in future.
--- a/python/samba/emulate/traffic_packets.py
+++ b/python/samba/emulate/traffic_packets.py
@@ -336,7 +336,7 @@
# try to guess the search expression (don't bother for base searches, as
# they're only looking up a single object)
- if (filter is None or filter is '') and scope != SCOPE_BASE:
+ if (filter is None or filter == '') and scope != SCOPE_BASE:
filter = context.guess_search_filter(attrs, dn_sig, dn)
samdb.search(dn,
More information about the Pkg-samba-maint
mailing list