The branch, master has been updated
via 1f97aeac6b8 traffic_packets: fix SyntaxWarning: "is" with a literal
from e7dfe87ac64 smbd: unix_convert_step(). Fix use of state->end as a
boolean, always compare with NULL.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 1f97aeac6b866ff4ecdb704ecf15130eb2f87a9a
Author: David Disseldorp <[email protected]>
Date: Tue Apr 21 14:43:14 2020 +0200
traffic_packets: fix SyntaxWarning: "is" with a literal
Python 3.8 adds this warning via 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.
Reported-by: L. van Belle <[email protected]>
Signed-off-by: David Disseldorp <[email protected]>
Reviewed-by: Noel Power <[email protected]>
Autobuild-User(master): David Disseldorp <[email protected]>
Autobuild-Date(master): Mon Apr 27 12:19:59 UTC 2020 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
python/samba/emulate/traffic_packets.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/python/samba/emulate/traffic_packets.py
b/python/samba/emulate/traffic_packets.py
index a585482ccd4..95c7465d2fc 100644
--- a/python/samba/emulate/traffic_packets.py
+++ b/python/samba/emulate/traffic_packets.py
@@ -336,7 +336,7 @@ def packet_ldap_3(packet, conversation, context):
# 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,
--
Samba Shared Repository