Browse Source

Store site names escaped to get around MySQL 5.1 unicode limitation.

pull/24/head
Ben Kurtovic 12 years ago
parent
commit
99f75be9ee
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      pages/copyvios.mako

+ 2
- 2
pages/copyvios.mako View File

@@ -139,7 +139,7 @@
if time_since_update > max_staleness:
update_sites(bot.wiki.get_site(), cursor)
cursor.execute(query2)
langs = cursor.fetchall()
langs = [(code, name.decode("unicode_escape")) for (code, name) in cursor.fetchall()]
cursor.execute(query3)
projects = cursor.fetchall()
return langs, projects
@@ -165,7 +165,7 @@
this.add((project, project.capitalize()))
if this:
code = site["code"]
name = site["name"]
name = site["name"].encode("unicode_escape")
languages.add((code, u"{0} ({1})".format(code, name)))
projects |= this
save_site_updates(cursor, languages, projects)


Loading…
Cancel
Save