buildtools: Prefer ‘x not in y’ to ‘not x in y’
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 29 Aug 2023 03:10:53 +0000 (15:10 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 30 Aug 2023 02:15:28 +0000 (02:15 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/wafsamba.py

index 5f9d42075af64f0af7a6d4ff5074722efabced95..c14eb58c879edb5fdcb0f2937886a6a107c63d48 100644 (file)
@@ -82,7 +82,7 @@ def ADD_INIT_FUNCTION(bld, subsystem, target, init_function):
         return
     bld.ASSERT(subsystem is not None, "You must specify a subsystem for init_function '%s'" % init_function)
     cache = LOCAL_CACHE(bld, 'INIT_FUNCTIONS')
-    if not subsystem in cache:
+    if subsystem not in cache:
         cache[subsystem] = []
     cache[subsystem].append( { 'TARGET':target, 'INIT_FUNCTION':init_function } )
 Build.BuildContext.ADD_INIT_FUNCTION = ADD_INIT_FUNCTION