summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergiusz 'q3k' Bazański <q3k@q3k.org>2013-11-04 12:52:08 +0100
committerSergiusz 'q3k' Bazański <q3k@q3k.org>2013-11-04 12:52:08 +0100
commit1922ac94321826f51ca482445e1d920f943c1843 (patch)
tree900e2e72de81b242619d6943bc199c308eaf0657
parent661555ac5f3eff4e15a51a77414d396e54122484 (diff)
downloadwww-main-1922ac94321826f51ca482445e1d920f943c1843.tar.gz
www-main-1922ac94321826f51ca482445e1d920f943c1843.tar.bz2
www-main-1922ac94321826f51ca482445e1d920f943c1843.zip
inf cannot into spaceapi
-rw-r--r--main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.py b/main.py
index fb688e9..b92a9a2 100644
--- a/main.py
+++ b/main.py
@@ -97,7 +97,8 @@ def spaceapi():
space_open = len(at_object['users']) > 0
people_now_present['value'] = len(at_object['users'])
- people_now_present['names'] = list(user['login'] for user in at_object['users'])
+ if len(at_object['users']) > 0:
+ people_now_present['names'] = list(user['login'] for user in at_object['users'])
open_day = space_open and int(strftime("%w")) == app.config['OPEN_DAY_WEEKDAY'] \
and int(strftime("%H")) >= app.config['OPEN_DAY_BEGIN_HOUR']