summaryrefslogtreecommitdiff
path: root/client/modules/News.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/modules/News.py')
-rw-r--r--client/modules/News.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/client/modules/News.py b/client/modules/News.py
index d80b791..433ea05 100644
--- a/client/modules/News.py
+++ b/client/modules/News.py
@@ -41,7 +41,8 @@ def handle(text, mic, profile):
Arguments:
text -- user-input, typically transcribed speech
mic -- used to interact with the user (for both input and output)
- profile -- contains information related to the user (e.g., phone number)
+ profile -- contains information related to the user (e.g., phone
+ number)
"""
mic.say("Pulling up the news")
articles = getTopArticles(maxResults=3)
@@ -84,17 +85,23 @@ def handle(text, mic, profile):
if profile['prefers_email']:
body += article_link
else:
- if not app_utils.emailUser(profile, SUBJECT="", BODY=article_link):
- mic.say(
- "I'm having trouble sending you these articles. Please make sure that your phone number and carrier are correct on the dashboard.")
+ if not app_utils.emailUser(profile, SUBJECT="",
+ BODY=article_link):
+ mic.say("I'm having trouble sending you these " +
+ "articles. Please make sure that your " +
+ "phone number and carrier are correct " +
+ "on the dashboard.")
return
# if prefers email, we send once, at the end
if profile['prefers_email']:
body += "</ul>"
- if not app_utils.emailUser(profile, SUBJECT="Your Top Headlines", BODY=body):
- mic.say(
- "I'm having trouble sending you these articles. Please make sure that your phone number and carrier are correct on the dashboard.")
+ if not app_utils.emailUser(profile,
+ SUBJECT="Your Top Headlines",
+ BODY=body):
+ mic.say("I'm having trouble sending you these articles. " +
+ "Please make sure that your phone number and " +
+ "carrier are correct on the dashboard.")
return
mic.say("All set")
@@ -105,7 +112,8 @@ def handle(text, mic, profile):
if 'phone_number' in profile:
mic.say("Here are the current top headlines. " + all_titles +
- ". Would you like me to send you these articles? If so, which?")
+ ". Would you like me to send you these articles? " +
+ "If so, which?")
handleResponse(mic.activeListen())
else: