Skip to content

Commit

Permalink
Merge pull request #501 from maciej-lech/master
Browse files Browse the repository at this point in the history
Fix util.py:nimbus_storm_version
  • Loading branch information
kbourgoin authored Aug 9, 2024
2 parents af44ba3 + 8534f5a commit e115ac5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions streamparse/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,17 @@ def nimbus_storm_version(nimbus_client):
"""Get the Storm version that Nimbus is reporting, if it's reporting it.
:returns: Storm version that Nimbus is reporting, if it's reporting it.
Will return `LegacyVersion('')` if it's not reporting anything.
Will return `Version('0.0.0')` if it's not reporting anything.
:rtype: pkg_resources.Version
"""
version = parse_version("")
version = "0.0.0"
nimbuses = nimbus_client.getClusterInfo().nimbuses
if nimbuses is not None:
for nimbus in nimbuses:
if nimbus.version != "VERSION_NOT_PROVIDED":
version = parse_version(nimbus.version)
version = nimbus.version
break
return version
return parse_version(version)


def storm_lib_version():
Expand Down
2 changes: 1 addition & 1 deletion streamparse/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


def _safe_int(string):
""" Simple function to convert strings into ints without dying. """
"""Simple function to convert strings into ints without dying."""
try:
return int(string)
except ValueError:
Expand Down

0 comments on commit e115ac5

Please sign in to comment.