From 370fe518f2cc87d65af01264918cca6fac70940c Mon Sep 17 00:00:00 2001 From: wilderrodrigues Date: Wed, 17 Dec 2014 12:48:29 +0100 Subject: [PATCH] Fixing delete_leases function. It was refering a non-existing variable. --- systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py index 63598a5fd02..33452e00d46 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py @@ -91,6 +91,7 @@ class CsDhcp(CsDataBag): self.conf.search(sline, line) def delete_leases(self): + changed = [] leases = [] try: for line in open(LEASES): @@ -101,6 +102,8 @@ class CsDhcp(CsDataBag): "host": bits[3], "del": False } + changed.append(to) + for v in changed: if v['mac'] == to['mac'] or v['ip'] == to['ip'] or v['host'] == to['host']: to['del'] = True