import copy
import threading
-import bwlimitlxc as bwlimit
+import plnode.bwlimit as bwlimit
+
import logger
import tools
import database
if (runningrates['maxrate'] != new_maxrate) or \
(runningrates['minrate'] != self.MinRate * 1000) or \
(runningrates['maxexemptrate'] != new_maxi2rate) or \
- (runningrates['minexemptrate'] != self.Mini2Rate * 1000) or \
+ ('minexemptrate' in runningrates and runningrates['minexemptrate'] != self.Mini2Rate * 1000) or \
(runningrates['share'] != self.Share):
# Apply parameters
bwlimit.set(xid = self.xid, dev = dev_default,
if default_MaxRate == -1:
default_MaxRate = 1000000
+ # xxx $Id$
+ # with svn we used to have a trick to detect upgrades of this file
+ # this has gone with the move to git, without any noticeable effect on operations though
try:
f = open(DB_FILE, "r+")
logger.verbose("bwmon: Loading %s" % DB_FILE)