rdps.py: Use string equality for comparing strings

In Python, `is` is meant for checking object equality,
not string equality. For more info, see
https://docs.python.org/3/reference/expressions.html#is
This commit is contained in:
Moshe Kaplan 2021-01-24 16:21:00 +00:00 committed by Wireshark GitLab Utility
parent 31546ad35d
commit 748d63712e
1 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ def main():
for line in input:
#line = line.rstrip()
if state is STATE_NULL:
if state == STATE_NULL:
if line.startswith("% ---- wireshark preamble start ---- %"):
state = STATE_PREAMBLE
start_code(output, "preamble")
@ -106,14 +106,14 @@ def main():
state = STATE_FINALE
start_code(output, "finale")
continue
elif state is STATE_PREAMBLE:
elif state == STATE_PREAMBLE:
if line.startswith("% ---- wireshark preamble end ---- %"):
state = STATE_NULL
end_code(output)
continue
else:
write_code(output, line)
elif state is STATE_FINALE:
elif state == STATE_FINALE:
if line.startswith("% ---- wireshark finale end ---- %"):
state = STATE_NULL
end_code(output)