Skip to content
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

chore(internet_port): added new ports and removed unnecessary string class #27078

Merged
merged 8 commits into from
Feb 15, 2024
11 changes: 8 additions & 3 deletions superset/advanced_data_type/plugins/internet_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
"ldaps": [636],
"imap2": [143], # aka imap
"imaps": [993],
"MySQL": [3306],
"Remote Desktop": [3389],
"dns": [53],
"ctf": [84],
"pdap": [344],
}


Expand Down Expand Up @@ -83,9 +88,9 @@ def port_translation_func(req: AdvancedDataTypeRequest) -> AdvancedDataTypeRespo
else port_conversion_dict[string_value]
)
except (KeyError, ValueError):
resp["error_message"] = str(
f"'{string_value}' does not appear to be a port name or number"
)
resp[
"error_message"
] = f"'{string_value}' does not appear to be a port name or number"
break
else:
resp["display_value"] = ", ".join(
Expand Down
Loading