# HG changeset patch # User jakob krainz # Date 1362573862 -3600 # Wed Mar 06 13:44:22 2013 +0100 # Node ID 42d8ca01a203e568f710504beca8768de5739e3e # Parent e02e33d3cd55edf062b8c634ab77d5adabd244d7 bugfix diff --git a/src/b.py b/src/b.py --- a/src/b.py +++ b/src/b.py @@ -137,7 +137,10 @@ Currently SHA1 hashing is used. It should be plenty for our purposes. """ - return hashlib.sha1(text.encode('utf-8')).hexdigest() + try: + return hashlib.sha1(text.encode('utf-8')).hexdigest() + except UnicodeDecodeError as e: + return hashlib.sha1(text).hexdigest() def _mkdir_p(path): """ race condition handling recursive mkdir -p call @@ -892,4 +895,4 @@ ret.append(file) ui.write(ret if bug_change else None) ui.write('\n') - \ No newline at end of file +