Skip to content

Commit

Permalink
chore(internet_port): added new ports and removed unnecessary string …
Browse files Browse the repository at this point in the history
…class (apache#27078)
  • Loading branch information
anirudh-hegde authored and sfirke committed Mar 22, 2024
1 parent 38a3d24 commit d33e71c
Showing 1 changed file with 8 additions and 3 deletions.
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

0 comments on commit d33e71c

Please sign in to comment.