Correct NoneType issue on Wifi signal (related to issue #1973)

This commit is contained in:
nicolargo 2018-12-23 14:40:24 +01:00
parent 229710d60e
commit 162ed83986
2 changed files with 3 additions and 3 deletions

2
NEWS
View File

@ -22,8 +22,8 @@ Bugs corrected:
* ERROR -- Can not grab extended stats (invalid attr name 'num_fds') #1351 * ERROR -- Can not grab extended stats (invalid attr name 'num_fds') #1351
* Action on port/web plugins is not working #1358 * Action on port/web plugins is not working #1358
* Support for monochrome (serial) terminals e.g. vt220 #1362 * Support for monochrome (serial) terminals e.g. vt220 #1362
* Some field name are incorrect in CSV export #1372
* TypeError on opening (Wifi plugin) #1373 * TypeError on opening (Wifi plugin) #1373
* Some field name are incorrect in CSV export #1372
Others: Others:

View File

@ -178,8 +178,8 @@ class Plugin(GlancesPlugin):
# Hotspot list (sorted by name) # Hotspot list (sorted by name)
for i in sorted(self.stats, key=operator.itemgetter(self.get_key())): for i in sorted(self.stats, key=operator.itemgetter(self.get_key())):
# Do not display hotspot with no name (/ssid)... # Do not display hotspot with no name (/ssid)...
# of ssid None... See issue #1151 # of ssid/signal None... See issue #1151 and #issue1973
if i['ssid'] == '' or i['ssid'] is None: if i['ssid'] == '' or i['ssid'] is None or i['signal'] is None:
continue continue
ret.append(self.curse_new_line()) ret.append(self.curse_new_line())
# New hotspot # New hotspot