From 9bf86e38837121c738aae1eb5e1dbdaf69656198 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Thu, 14 Jun 2012 19:38:31 +0200 Subject: [PATCH] config.py: Add __contains__ method --- daklib/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daklib/config.py b/daklib/config.py index 7e3c8bac..1e9299f2 100755 --- a/daklib/config.py +++ b/daklib/config.py @@ -85,7 +85,10 @@ class Config(object): self.find_b = self.Cnf.find_b def has_key(self, name): - return self.Cnf.has_key(name) + return name in self.Cnf + + def __contains__(self, name): + return name in self.Cnf def __getitem__(self, name): return self.Cnf[name] -- 2.39.5