Browse Source

Make cache.langs, cache.projects sorted lists.

pull/24/head
Ben Kurtovic 10 years ago
parent
commit
f2c1d5b853
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app.fcgi
  2. +1
    -1
      copyvios/sites.py

+ 1
- 1
app.fcgi View File

@@ -45,7 +45,7 @@ def catch_errors(func):
@app.before_first_request @app.before_first_request
def setup_app(): def setup_app():
cache.bot = Bot(".earwigbot", 100) cache.bot = Bot(".earwigbot", 100)
cache.langs, cache.projects = set(), set()
cache.langs, cache.projects = [], []
cache.last_sites_update = 0 cache.last_sites_update = 0
cache.background_data = {} cache.background_data = {}
cache.last_background_updates = {} cache.last_background_updates = {}


+ 1
- 1
copyvios/sites.py View File

@@ -65,4 +65,4 @@ def _load_sites():
code = site["code"] code = site["code"]
langs.add((code, u"{0} ({1})".format(code, site["name"]))) langs.add((code, u"{0} ({1})".format(code, site["name"])))
projects |= this projects |= this
return langs, projects
return list(sorted(langs)), list(sorted(projects))

Loading…
Cancel
Save