expires_after cardinality, bug fixes

This commit is contained in:
Arseniy Kuznetsov
2022-09-17 09:43:46 +01:00
parent 7aeb02ac71
commit d0456eab19
10 changed files with 45 additions and 25 deletions

View File

@@ -85,7 +85,7 @@ class BaseOutputProcessor:
wifi_rates_rgx = re.compile(r'(\d*(?:\.\d*)?)([GgMmKk]bps?)')
config_handler.re_compiled['wifi_rates_rgx'] = wifi_rates_rgx
rc = wifi_rates_rgx.search(rate)
return f'{int(float(rc[1]))} {rc[2]}' if rc else ''
return f'{int(float(rc[1]))} {rc[2]}' if rc and len(rc.groups()) == 2 else rate
@staticmethod
def parse_timedelta(time):