Skip to content

Commit e115ac5

Browse files
authored
Merge pull request #501 from maciej-lech/master
Fix util.py:nimbus_storm_version
2 parents af44ba3 + 8534f5a commit e115ac5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

streamparse/util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,17 +382,17 @@ def nimbus_storm_version(nimbus_client):
382382
"""Get the Storm version that Nimbus is reporting, if it's reporting it.
383383
384384
:returns: Storm version that Nimbus is reporting, if it's reporting it.
385-
Will return `LegacyVersion('')` if it's not reporting anything.
385+
Will return `Version('0.0.0')` if it's not reporting anything.
386386
:rtype: pkg_resources.Version
387387
"""
388-
version = parse_version("")
388+
version = "0.0.0"
389389
nimbuses = nimbus_client.getClusterInfo().nimbuses
390390
if nimbuses is not None:
391391
for nimbus in nimbuses:
392392
if nimbus.version != "VERSION_NOT_PROVIDED":
393-
version = parse_version(nimbus.version)
393+
version = nimbus.version
394394
break
395-
return version
395+
return parse_version(version)
396396

397397

398398
def storm_lib_version():

streamparse/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222

2323
def _safe_int(string):
24-
""" Simple function to convert strings into ints without dying. """
24+
"""Simple function to convert strings into ints without dying."""
2525
try:
2626
return int(string)
2727
except ValueError:

0 commit comments

Comments
 (0)