From 0fde4c2e3feb5e581b7041c9e9e1bce7fe3a0bf3 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 30 Apr 2010 16:26:33 +0100 Subject: [PATCH] Added further validation onto the Inbox object --- reddit/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reddit/api.py b/reddit/api.py index 9051260..05e9a53 100644 --- a/reddit/api.py +++ b/reddit/api.py @@ -53,6 +53,9 @@ class Inbox(): @property def _inbox_data(self): + if not self.login_cookie: + raise NotLoggedIn + if not hasattr(self, '__inbox_cache'): inbox = json.load(self._opener.open(self.REDDIT_API_INBOX))['data']