mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Add some better error detection into the Reddit API, also state exactly what the arguments are
This commit is contained in:
@@ -128,7 +128,7 @@ class Inbox():
|
|||||||
return self._inbox_data.__iter__()
|
return self._inbox_data.__iter__()
|
||||||
|
|
||||||
def send(self, to, subject, text):
|
def send(self, to, subject, text):
|
||||||
if not self.login_cookie:
|
if not hasattr(self, 'login_cookie') or not self.login_cookie:
|
||||||
raise NotLoggedIn
|
raise NotLoggedIn
|
||||||
|
|
||||||
data = { 'to': to,
|
data = { 'to': to,
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ import settings
|
|||||||
|
|
||||||
@task(ignore_result=True)
|
@task(ignore_result=True)
|
||||||
def send_reddit_message(to, subject, message):
|
def send_reddit_message(to, subject, message):
|
||||||
ib = Inbox(settings.REDDIT_USER, settings.REDDIT_PASSWORD)
|
ib = Inbox(username=settings.REDDIT_USER, password=settings.REDDIT_PASSWORD)
|
||||||
ib.send(to, subject, message)
|
ib.send(to, subject, message)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user