diff service/tomatoWifi/tomatoWifi.py @ 74:bca6d6c63bdc

handle wifi users with no clientHostname Ignore-this: 41f4c33d9ed84b8e0417c76dd7de58d5
author drewp@bigasterisk.com
date Wed, 29 May 2013 00:30:51 -0700
parents f8cc3d1baa85
children b0c168f562e8
line wrap: on
line diff
--- a/service/tomatoWifi/tomatoWifi.py	Wed May 29 00:30:37 2013 -0700
+++ b/service/tomatoWifi/tomatoWifi.py	Wed May 29 00:30:51 2013 -0700
@@ -57,7 +57,7 @@
         def rowDict(row):
             row['cls'] = "signal" if row.get('connected') else "nosignal"
             if 'name' not in row:
-                row['name'] = row['clientHostname']
+                row['name'] = row.get('clientHostname', '-')
             if 'signal' not in row:
                 row['signal'] = 'yes' if row['connected'] else 'no'