diff --git a/cbpi/__init__.py b/cbpi/__init__.py index cee5728..2a547cd 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1 +1 @@ -__version__ = "4.0.2.0.a17" +__version__ = "4.0.2.0.a18" diff --git a/cbpi/controller/system_controller.py b/cbpi/controller/system_controller.py index 153a05b..af3c8a0 100644 --- a/cbpi/controller/system_controller.py +++ b/cbpi/controller/system_controller.py @@ -231,11 +231,17 @@ class SystemController: try: for nic in info: if nic == 'eth0': - if info[nic].speed: - eth0speed = info[nic].speed + if info[nic].isup == True: + if info[nic].speed: + eth0speed = info[nic].speed + else: + eth0speed = "down" if nic == 'wlan0': - if info[nic].speed: - wlan0speed = info[nic].speed + if info[nic].isup == True: + if info[nic].speed: + wlan0speed = info[nic].speed + else: + wlan0speed = "down" except Exception as e: logging.info(e) except: @@ -259,11 +265,17 @@ class SystemController: try: for nic in info: if nic == 'Ethernet': - if info[nic].speed: - eth0speed = info[nic].speed + if info[nic].isup == True: + if info[nic].speed: + eth0speed = info[nic].speed + else: + eth0speed = "down" if nic == 'WLAN': - if info[nic].speed: - wlan0speed = info[nic].speed + if info[nic].isup == True: + if info[nic].speed: + wlan0speed = info[nic].speed + else: + wlan0speed = "down" except Exception as e: logging.info(e) except: