diff options
author | Moshe Kaplan <me@moshekaplan.com> | 2021-01-24 16:21:00 +0000 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-01-25 11:32:12 +0000 |
commit | 748d63712eda408f58294a4ad0236fbfceacc11b (patch) | |
tree | 132c86b9ba4fd9c7cdb86508ddcba9bccff8374f /tools | |
parent | 31546ad35d2521af594f01a9765bebca0b19993f (diff) |
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
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/rdps.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/rdps.py b/tools/rdps.py index 64e62a1340..ddad0bce43 100755 --- a/tools/rdps.py +++ b/tools/rdps.py @@ -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) |