summaryrefslogtreecommitdiff
path: root/client/modules
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-09-05 11:03:17 -0400
committerschneefux <schneefux+commit@schneefux.xyz>2014-09-05 11:03:17 -0400
commit202be4874246c6c80b823827cacb4ed5cb6a849e (patch)
treea96328b379d6041ea9359423e5fec519365469fc /client/modules
parentbd72c31b6e9e08c03198c106c49ebf904a50a9cb (diff)
parentba59d05594aa13cf7bfd9a37d22e5465aeb5d5f0 (diff)
downloadjasper-client-202be4874246c6c80b823827cacb4ed5cb6a849e.tar.gz
jasper-client-202be4874246c6c80b823827cacb4ed5cb6a849e.zip
Merge pull request #149 from alexsiri7/news_module_fixes
Fixed sending news by email
Diffstat (limited to 'client/modules')
-rw-r--r--client/modules/HN.py2
-rw-r--r--client/modules/News.py2
-rw-r--r--client/modules/app_utils.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/client/modules/HN.py b/client/modules/HN.py
index 493fa1d..863d40a 100644
--- a/client/modules/HN.py
+++ b/client/modules/HN.py
@@ -68,7 +68,7 @@ def handle(text, mic, profile):
return [service.parse(w) for w in output]
chosen_articles = extractOrdinals(text)
- send_all = chosen_articles is [] and app_utils.isPositive(text)
+ send_all = not chosen_articles and app_utils.isPositive(text)
if send_all or chosen_articles:
mic.say("Sure, just give me a moment")
diff --git a/client/modules/News.py b/client/modules/News.py
index 59495a3..8b4b9a3 100644
--- a/client/modules/News.py
+++ b/client/modules/News.py
@@ -59,7 +59,7 @@ def handle(text, mic, profile):
return [service.parse(w) for w in output]
chosen_articles = extractOrdinals(text)
- send_all = chosen_articles is [] and app_utils.isPositive(text)
+ send_all = not chosen_articles and app_utils.isPositive(text)
if send_all or chosen_articles:
mic.say("Sure, just give me a moment")
diff --git a/client/modules/app_utils.py b/client/modules/app_utils.py
index 7e39cbf..68cce38 100644
--- a/client/modules/app_utils.py
+++ b/client/modules/app_utils.py
@@ -120,4 +120,4 @@ def isPositive(phrase):
Arguments:
phrase -- the input phrase to-be evaluated
"""
- return re.search(r'\b(sure|yes|yeah|go)\b', phrase, re.IGNORECASE)
+ return bool(re.search(r'\b(sure|yes|yeah|go)\b', phrase, re.IGNORECASE))