diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/monitor.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/monitor.py b/src/monitor.py index 8d6c909..7cb9192 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -2,6 +2,7 @@ """net_monitor: wifi monitoring""" import os +import os.path import socket import fcntl import struct @@ -159,6 +160,8 @@ class Monitor: """Check if device is wireless and get its details if necessary""" try: stats = {} + if not os.path.isfile("/proc/net/wireless"): + return stats with open("/proc/net/wireless") as fd: ifaces = fd.readlines()[2:] for line in ifaces: |