nmdbcopy = copy.deepcopy(database.db)
database.db_lock.release()
try:
- if getDefaults(nmdbcopy): sync(nmdbcopy)
- else: logger.log("bwmon: DISABLED.")
+ if getDefaults(nmdbcopy) and len(bwlimit.tc("class show dev eth0")) > 0:
+ # class show to check if net:InitNodeLimit:bwlimit.init has run.
+ sync(nmdbcopy)
+ else: logger.log("bwmon: BW limits DISABLED.")
except: logger.log_exc()
lock.clear()