Changeset - 6ac5ee600993
[Not reviewed]
default
0 1 0
Dennis Fink - 9 years ago 2016-03-22 12:39:53
dennis.fink@c3l.lu
Fix some stuff
1 file changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
spaceapi/utils.py
Show inline comments
 
@@ -98,14 +98,14 @@ class ActiveStatus(Singleton, dict):
 
        if value is not None:
 
            self['state']['open'] = value
 

	
 
            if 'twitter_consumer_key' in current_app.config:
 
            if 'TWITTER_CONSUMER_KEY' in current_app.config:
 
                auth = tweepy.OAuthHandler(
 
                    current_app.config['twitter_consumer_key'],
 
                    current_app.config['twitter_consumer_secret']
 
                    current_app.config['TWITTER_CONSUMER_KEY'],
 
                    current_app.config['TWITTER_CONSUMER_SECRET']
 
                )
 
                auth.set_access_token(
 
                    current_app.config['twitter_access_token_key'],
 
                    current_app.config['twitter.access_token_secret']
 
                    current_app.config['TWITTER_ACCESS_TOKEN_KEY'],
 
                    current_app.config['TWITTER_ACCESS_TOKEN_SECRET']
 
                )
 
                api = tweepy.API(auth)
 

	
 
@@ -116,9 +116,9 @@ class ActiveStatus(Singleton, dict):
 

	
 
            if not value:
 
                if 'people_now_present' in self['sensors']:
 
                    self['sensors']['people_now_present']['value'] = 0
 
                    if 'names' in self['sensors']['people_now_present']:
 
                        del self['sensors']['people_now_present']['names']
 
                    self['sensors']['people_now_present'][0]['value'] = 0
 
                    if 'names' in self['sensors']['people_now_present'][0]:
 
                        del self['sensors']['people_now_present'][0]['names']
 

	
 
                if 'message' in self['state']:
 
                    del self['state']['message']
0 comments (0 inline, 0 general)