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:
James Carter 2023-08-03 09:40:24 -04:00 committed by Petr Lautrbach
parent 1c19dc4f64
commit f6dc6acfa0

View File

@ -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