Skip to content

Commit

Permalink
Comment: Fixed an inappropriate test expression to remove a logical s…
Browse files Browse the repository at this point in the history
…hort circuit. Signed-off-by: Munawar Hafiz <munawar.hafiz@gmail.com>

Signed-off-by: OpenRefactory, Inc <56681071+openrefactory@users.noreply.github.com>
  • Loading branch information
openrefactory authored and THS-on committed Sep 21, 2023
1 parent d2429d0 commit 4af9457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keylime/web_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def get_restful_params(urlstring: str) -> Dict[str, Union[str, None]]:

# If first token looks like an API version, validate it and make sure it's supported
api_version = "0"
if path_tokens[0] and len(path_tokens[0]) >= 0 and re.match(r"^v?[0-9]+(\.[0-9]+)?", path_tokens[0]):
if path_tokens[0] and re.match(r"^v?[0-9]+(\.[0-9]+)?", path_tokens[0]):
version = keylime_api_version.normalize_version(path_tokens[0])

if keylime_api_version.is_supported_version(version):
Expand Down

0 comments on commit 4af9457

Please sign in to comment.