mirror of
https://github.com/SELinuxProject/selinux
synced 2025-04-10 19:51:56 +00:00
python: Use isinstance() instead of type()
CI testing fails while running flake8 on python scripts with the message "./python/semanage/seobject.py:250:16: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`" Use "isinstance(args, str)" instead of "type(args) == str" Signed-off-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
1c19dc4f64
commit
f6dc6acfa0
@ -247,7 +247,7 @@ class semanageRecords:
|
||||
global handle
|
||||
if args:
|
||||
# legacy code - args was store originally
|
||||
if type(args) == str:
|
||||
if isinstance(args, str):
|
||||
self.store = args
|
||||
else:
|
||||
self.args = args
|
||||
|
Loading…
Reference in New Issue
Block a user