Commits

Donald Stufft committed ecfc1b8

Only consider filenames with printable characters

Comments (0)

Files changed (1)

tools/integrate-redis-stats.py

 import sys
 import datetime
 import redis
+import string
 
 from itertools import izip, izip_longest
 
 cursor = store.get_cursor()
 cursor.executemany(
     "UPDATE release_files SET downloads = downloads + %s WHERE filename = %s",
-    downloads,
+    (d for d in downloads if not set(d[1]) - set(string.printable)),
 )
 store.commit()
 store.close()