diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-08-22 09:32:35 +0800 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-08-22 09:32:35 +0800 |
| commit | 0d4bb63b3727e44c973d167be0d82c4c062648f6 (patch) | |
| tree | 2cbdddfc90fef1c345582b576dd5c45da84f46d7 /client/conversation.py | |
| parent | 71ac7e8d50a3bc9ee814f334b938cda336377d4f (diff) | |
| download | jasper-client-0d4bb63b3727e44c973d167be0d82c4c062648f6.tar.gz jasper-client-0d4bb63b3727e44c973d167be0d82c4c062648f6.zip | |
Minor style fixes: removed unused imports, commented-out code, etc.
Diffstat (limited to 'client/conversation.py')
| -rwxr-xr-x | client/conversation.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/conversation.py b/client/conversation.py index bad5073..a5937da 100755 --- a/client/conversation.py +++ b/client/conversation.py @@ -3,6 +3,7 @@ from musicmode import * from brain import Brain from mpd import MPDClient + class Conversation(object): def __init__(self, persona, mic, profile): @@ -16,7 +17,7 @@ class Conversation(object): """A wrapper for querying brain.""" # check if input is meant to start the music module - if any(x in text.upper() for x in ["SPOTIFY","MUSIC"]): + if any(x in text.upper() for x in ["SPOTIFY", "MUSIC"]): # check if mpd client is running try: client = MPDClient() @@ -24,7 +25,8 @@ class Conversation(object): client.idletimeout = None client.connect("localhost", 6600) except: - self.mic.say("I'm sorry. It seems that Spotify is not enabled. Please read the documentation to learn how to configure Spotify.") + self.mic.say( + "I'm sorry. It seems that Spotify is not enabled. Please read the documentation to learn how to configure Spotify.") return self.mic.say("Please give me a moment, I'm loading your Spotify playlists.") @@ -32,7 +34,6 @@ class Conversation(object): music_mode.handleForever() return - self.brain.query(text) def handleForever(self): |
