~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to mainpage/online_users_middleware.py

  • Committer: kaputtnik
  • Date: 2019-06-14 18:40:56 UTC
  • mfrom: (532.1.31 widelands)
  • Revision ID: kaputtnik-20190614184056-l0ha8pm5zais9mxk
Adapted code for use with python 3.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
        # Perform the multiget on the individual online uid keys
38
38
        online_keys = ['online-%s' % (u,) for u in uids]
39
 
        fresh = cache.get_many(online_keys).keys()
 
39
        fresh = list(cache.get_many(online_keys).keys())
40
40
        online_now_ids = [int(k.replace('online-', '')) for k in fresh]
41
41
 
42
42
        # If the user is authenticated, add their id to the list