summaryrefslogtreecommitdiff
path: root/client/modules/News.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-10-06 16:52:53 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-10-06 16:52:53 +0200
commit2b1e8411ab5eaa7e1349b78d03270ab02ae2950d (patch)
treeed914cbf8964bbe26ba28e80589f4c289b3fac3a /client/modules/News.py
parent890a5798fcf7f9b9dc06529aa4bc7fe903d7ca1a (diff)
downloadjasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.tar.gz
jasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.zip
Fix flake8 style nits
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: