diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-06 16:52:53 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-06 16:52:53 +0200 |
| commit | 2b1e8411ab5eaa7e1349b78d03270ab02ae2950d (patch) | |
| tree | ed914cbf8964bbe26ba28e80589f4c289b3fac3a /client/modules/Birthday.py | |
| parent | 890a5798fcf7f9b9dc06529aa4bc7fe903d7ca1a (diff) | |
| download | jasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.tar.gz jasper-client-2b1e8411ab5eaa7e1349b78d03270ab02ae2950d.zip | |
Fix flake8 style nits
Diffstat (limited to 'client/modules/Birthday.py')
| -rw-r--r-- | client/modules/Birthday.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/client/modules/Birthday.py b/client/modules/Birthday.py index b484a4f..200af94 100644 --- a/client/modules/Birthday.py +++ b/client/modules/Birthday.py @@ -1,7 +1,7 @@ # -*- coding: utf-8-*- import datetime import re -from facebook import * +import facebook from app_utils import getTimezone WORDS = ["BIRTHDAY"] @@ -15,18 +15,20 @@ 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) """ oauth_access_token = profile['keys']["FB_TOKEN"] - graph = GraphAPI(oauth_access_token) + graph = facebook.GraphAPI(oauth_access_token) try: - results = graph.request( - "me/friends", args={'fields': 'id,name,birthday'}) - except GraphAPIError: - mic.say( - "I have not been authorized to query your Facebook. If you would like to check birthdays in the future, please visit the Jasper dashboard.") + results = graph.request("me/friends", + args={'fields': 'id,name,birthday'}) + except facebook.GraphAPIError: + mic.say("I have not been authorized to query your Facebook. If you " + + "would like to check birthdays in the future, please visit " + + "the Jasper dashboard.") return except: mic.say( |
