Skip to content

Avoid warnings for using 'is' with literals in python 3.8+ #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions awsiot/mqtt_connection_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _get_metrics_str(current_username=""):
global _metrics_str

username_has_query = False
if not current_username.find("?") is -1:
if current_username.find("?") != -1:
username_has_query = True

if _metrics_str is None:
Expand Down Expand Up @@ -433,12 +433,12 @@ def _add_to_username_parameter(input_string, parameter_value, parameter_pretext)
"""
return_string = input_string

if not return_string.find("?") is -1:
if return_string.find("?") != -1:
return_string += "&"
else:
return_string += "?"

if not parameter_value.find(parameter_pretext) is -1:
if parameter_value.find(parameter_pretext) != -1:
return return_string + parameter_value
else:
return return_string + parameter_pretext + parameter_value
Expand Down