diff --git a/notify_attract.py b/notify_attract.py index db05b31..8d6159c 100755 --- a/notify_attract.py +++ b/notify_attract.py @@ -10,6 +10,7 @@ Example call: """ import json +import os import os.path import subprocess import sys @@ -42,6 +43,9 @@ except KeyError: url = parse.urljoin(PILLAR_URL, '/attract/api/%s/subversion/log' % project_url) +# Make sure that svnlook outputs UTF8. Without this, since we have an empty environment, +# it defaults to ASCII, outputting {U+xxxx} instead of UTF8 characters. +os.environ['LANG'] = 'en_US.utf8' def svnlook(subcmd): info = subprocess.check_output(['/usr/bin/svnlook', subcmd, svn_repo, '-r', str(svn_revision)])