From 4d7e1043efea876de0fe79c27c1600f61b9656cb Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 20 Dec 2012 16:40:23 +0000 Subject: [PATCH] On translation error, allow build to continue after asking user svn: r20802 --- setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bbddfb311..9140b789d 100644 --- a/setup.py +++ b/setup.py @@ -96,8 +96,15 @@ def build_trans(build_cmd): if newer(po_file, mo_file): cmd = 'msgfmt %s -o %s' % (po_file, mo_file) if os.system(cmd) != 0: + os.remove(mo_file) msg = 'ERROR: Building language translation files failed.' - raise SystemExit(msg) + ask = msg + '\n Continue building y/n [n] ' + if sys.version_info[0] < 3: + reply = raw_input(ask) + else: + reply = input(ask) + if reply in ['n', 'N']: + raise SystemExit(msg) #linux specific piece: target = 'share/locale/' + lang + '/LC_MESSAGES'