Fixing delete_leases function. It was refering a non-existing variable.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a9a1f5ca Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a9a1f5ca Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a9a1f5ca Branch: refs/heads/feature/systemvm-persistent-config Commit: a9a1f5cae11f148d14c867b9c7760ddc11feeb5e Parents: 5b75270 Author: wilderrodrigues <[email protected]> Authored: Wed Dec 17 12:48:29 2014 +0100 Committer: wilderrodrigues <[email protected]> Committed: Wed Feb 4 18:41:10 2015 +0100 ---------------------------------------------------------------------- systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a9a1f5ca/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py ---------------------------------------------------------------------- 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 63598a5..33452e0 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
