From 2dcae2c35f99f672813d6698875f110b1a83eea0 Mon Sep 17 00:00:00 2001 From: davidb Date: Tue, 22 Apr 2003 23:18:40 +0000 Subject: [PATCH] add a has_attr() method to rwhoisobject --- rwhoisd/Rwhois.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rwhoisd/Rwhois.py b/rwhoisd/Rwhois.py index 54c37d1..551ff90 100644 --- a/rwhoisd/Rwhois.py +++ b/rwhoisd/Rwhois.py @@ -83,6 +83,9 @@ class rwhoisobject: returned.""" return self.data.get(attr.strip().lower(), [default])[0] + + def has_attr(self, attr): + return self.data.has_key(attr.strip().lower()) def getid(self): """Return the RWhois ID of this object.""" -- 2.36.6