Skip to content

Commit

Permalink
Fixed error message (Azure#23284)
Browse files Browse the repository at this point in the history
  • Loading branch information
annatisch authored and rakshith91 committed Apr 10, 2022
1 parent 006a139 commit ff9eafa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ def parse_vault_id(url):
try:
parsed_uri = urlparse(url)
except Exception: # pylint: disable=broad-except
raise ValueError("'{}' is not not a valid url".format(url))
raise ValueError("'{}' is not a valid url".format(url))
if not (parsed_uri.scheme and parsed_uri.hostname):
raise ValueError("'{}' is not not a valid url".format(url))
raise ValueError("'{}' is not a valid url".format(url))

path = list(filter(None, parsed_uri.path.split("/")))

if len(path) < 2 or len(path) > 3:
raise ValueError("'{}' is not not a valid vault url".format(url))
raise ValueError("'{}' is not a valid vault url".format(url))

return _VaultId(
vault_url="{}://{}".format(parsed_uri.scheme, parsed_uri.hostname),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ def parse_key_vault_id(source_id):
try:
parsed_uri = parse.urlparse(source_id)
except Exception: # pylint: disable=broad-except
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))
if not (parsed_uri.scheme and parsed_uri.hostname):
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))

path = list(filter(None, parsed_uri.path.split("/")))

if len(path) < 2 or len(path) > 3:
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))

return KeyVaultResourceId(
source_id=source_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ def parse_key_vault_id(source_id):
try:
parsed_uri = parse.urlparse(source_id)
except Exception: # pylint: disable=broad-except
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))
if not (parsed_uri.scheme and parsed_uri.hostname):
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))

path = list(filter(None, parsed_uri.path.split("/")))

if len(path) < 2 or len(path) > 3:
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))

return KeyVaultResourceId(
source_id=source_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ def parse_key_vault_id(source_id):
try:
parsed_uri = parse.urlparse(source_id)
except Exception: # pylint: disable=broad-except
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))
if not (parsed_uri.scheme and parsed_uri.hostname):
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))

path = list(filter(None, parsed_uri.path.split("/")))

if len(path) < 2 or len(path) > 3:
raise ValueError("'{}' is not not a valid ID".format(source_id))
raise ValueError("'{}' is not a valid ID".format(source_id))

return KeyVaultResourceId(
source_id=source_id,
Expand Down

0 comments on commit ff9eafa

Please sign in to comment.