mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-19 04:34:30 +00:00
python/sepolgen: silence linter warning about has_key
flake8 warns about using has_key(): python/sepolgen/src/sepolgen/refparser.py:315:15: W601 .has_key() is deprecated, use 'in' However "spt.has_key(id)" uses function SupportMacros.has_key(), which is not the same as the "in" operator. Silence this warning by using "# noqa". Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
3d3c51d607
commit
20db6a5a73
@ -312,7 +312,7 @@ def collect(stmts, parent, val=None):
|
||||
|
||||
def expand(ids, s):
|
||||
for id in ids:
|
||||
if spt.has_key(id):
|
||||
if spt.has_key(id): # noqa
|
||||
s.update(spt.by_name(id))
|
||||
else:
|
||||
s.add(id)
|
||||
|
Loading…
Reference in New Issue
Block a user