ptypes.py: remove useless condition member != None

member = None is set before the if/else condition.
In the else code, when member is set it is checked
and if not-None it breaks out of the loop.
If the code is still in the loop for sure member is None.

Found by covscan.

Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Uri Lublin 2019-08-11 12:26:04 +03:00 committed by Frediano Ziglio
parent ff2e99d893
commit a52a0a0906

View File

@ -884,8 +884,6 @@ class ContainerType(Type):
member = m.lookup_case_member(name)
if member != None:
break
if member != None:
break
if member == None:
raise Exception("No member called %s found" % name)