diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-02-17 11:08:45 -0500 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-02-17 11:08:45 -0500 |
commit | ea43bfab1a93333d27b258e66ab97e7485d3c3cf (patch) | |
tree | 8f952d198b1f2aca3ff75c2425586cc588aa81d9 | |
parent | e357aab2882b5f34947729e34b9f9c01dd1e5d73 (diff) | |
download | pykolab-ea43bfab1a93333d27b258e66ab97e7485d3c3cf.tar.gz |
Make sure that if we call a function or use an attribute, not just imaplib.IMAP4{_SSL} is tested, but cyruslib's self.m as well
-rw-r--r-- | pykolab/imap/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py index baf7b30..20e284b 100644 --- a/pykolab/imap/__init__.py +++ b/pykolab/imap/__init__.py @@ -228,6 +228,11 @@ class IMAP(object): def __getattr__(self, name): if hasattr(self.imap, name): return getattr(self.imap, name) + elif hasattr(self.imap, 'm'): + if hasattr(self.imap.m, name): + return getattr(self.imap.m, name) + else: + raise AttributeError, _("%r has no attribute %s") % (self,name) else: raise AttributeError, _("%r has no attribute %s") % (self,name) |