From: Neal H. Walfield Date: Sat, 10 Dec 2011 14:49:15 +0000 (+0000) Subject: Ensure that the string passed to md5 is 7-bit clean. X-Git-Url: https://vcs.maemo.org/git/?p=feedingit;a=commitdiff_plain;h=90d0fe55a42574154728ada1a896056b724ecb02 Ensure that the string passed to md5 is 7-bit clean. --- diff --git a/src/rss_sqlite.py b/src/rss_sqlite.py index 9cbeb82..e64c8cc 100644 --- a/src/rss_sqlite.py +++ b/src/rss_sqlite.py @@ -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):