Ensure that the string passed to md5 is 7-bit clean.
[feedingit] / src / rss_sqlite.py
index 9cbeb82..e64c8cc 100644 (file)
@@ -54,6 +54,9 @@ import logging
 logger = logging.getLogger(__name__)
 
 def getId(string):
+    if issubclass(string.__class__, unicode):
+        string = string.encode('utf8', 'replace')
+
     return md5.new(string).hexdigest()
 
 def download_callback(connection):