From c5248d53d695c55ddf191285fa836797c44110e7 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 30 Sep 2023 19:22:39 +0200 Subject: [PATCH] Fixed frequency pretty print function --- RNS/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/RNS/__init__.py b/RNS/__init__.py index 26f8717..b9aee82 100755 --- a/RNS/__init__.py +++ b/RNS/__init__.py @@ -187,10 +187,7 @@ def prettyfrequency(hz, suffix="Hz"): for unit in units: if abs(num) < 1000.0: - if unit == "": - return "%.2f %s%s" % (num, unit, suffix) - else: - return "%.2f %s%s" % (num, unit, suffix) + return "%.2f %s%s" % (num, unit, suffix) num /= 1000.0 return "%.2f%s%s" % (num, last_unit, suffix)