From 3468dddd4f2e26de42bceb2983ecd6dceb72b10f Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Sun, 12 Jan 2014 14:12:04 +0100 Subject: [PATCH] Update countries.pot parser since format changed (iso_code -> iso.code) It changed in https://bitbucket.org/metabrainz/musicbrainz-server/pull-request/426/mbs-6373-only-translate-and-extract-area/diff --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3ecdcd4af..3214e2d24 100755 --- a/setup.py +++ b/setup.py @@ -355,6 +355,7 @@ class picard_update_countries(Command): break if relpath is not None: potfile = os.path.join(relpath, 'countries.pot') + isocode_comment = u'iso.code:' if os.path.isfile(potfile): log.info('Parsing %s' % potfile) with open(potfile, 'rb') as f: @@ -363,8 +364,8 @@ class picard_update_countries(Command): if not message.id or not isinstance(message.id, unicode): continue for comment in message.auto_comments: - if comment.startswith(u'iso_code:'): - code = comment.replace(u'iso_code:', u'') + if comment.startswith(isocode_comment): + code = comment.replace(isocode_comment, u'') country = message.id country_list.append((code, country)) if country_list: