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:
parent
31546ad35d
commit
748d63712e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue