Parcourir la source

Fix bug when page contains unicode.

pull/8/merge
Ben Kurtovic il y a 11 ans
Parent
révision
7970fab9f6
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      tasks/afc_copyvios.py

+ 1
- 1
tasks/afc_copyvios.py Voir le fichier

@@ -154,7 +154,7 @@ class AFCCopyvios(Task):
config, which is ``False`` by default.
"""
pageid = page.pageid
hash = sha256(page.get()).hexdigest()
hash = sha256(page.get().encode("utf8")).hexdigest()
query1 = "SELECT 1 FROM cache WHERE cache_id = ?"
query2 = "DELETE FROM cache WHERE cache_id = ?"
query3 = "INSERT INTO cache VALUES (?, ?, ?, CURRENT_TIMESTAMP, ?, ?)"


Chargement…
Annuler
Enregistrer