From e3fb140c8d44d751766535eedefcc4ada6544bd1 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 22 Dec 2008 04:09:48 +0000 Subject: Update dictionary accesses to work with Python 3.0 git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4999 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Deps.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/Server/Plugins/Deps.py') diff --git a/src/lib/Server/Plugins/Deps.py b/src/lib/Server/Plugins/Deps.py index 21ff302fe..8749f2a31 100644 --- a/src/lib/Server/Plugins/Deps.py +++ b/src/lib/Server/Plugins/Deps.py @@ -61,7 +61,7 @@ class Deps(Bcfg2.Server.Plugin.PrioDir): gdata = metadata.groups[:] gdata.sort() gdata = tuple(gdata) - if self.cache.has_key((entries, gdata)): + if (entries, gdata) in self.cache: prereqs = self.cache[(entries, gdata)] else: [src.Cache(metadata) for src in self.entries.values()] @@ -70,8 +70,8 @@ class Deps(Bcfg2.Server.Plugin.PrioDir): while toexamine: entry = toexamine.pop() matching = [src for src in self.entries.values() - if src.cache and src.cache[1].has_key(entry[0]) - and src.cache[1][entry[0]].has_key(entry[1])] + if src.cache and entry[0] in src.cache[1] + and entry[1] in src.cache[1][entry[0]]] if len(matching) > 1: prio = [int(src.priority) for src in matching] if prio.count(max(prio)) > 1: -- cgit v1.2.3-1-g7c22