Source

SCons / src / engine / SCons / Tool / msgfmt.py

Diff from to

File src/engine/SCons/Tool/msgfmt.py

   """ Generate `msgfmt` tool """
   import SCons.Util
   from SCons.Tool.GettextCommon import _detect_msgfmt
-  env['MSGFMT'] = _detect_msgfmt(env)
+  try:
+    env['MSGFMT'] = _detect_msgfmt(env)
+  except:
+    env['MSGFMT'] = 'msgfmt'
   env.SetDefault(
     MSGFMTFLAGS = [ SCons.Util.CLVar('-c') ],
     MSGFMTCOM = '$MSGFMT $MSGFMTFLAGS -o $TARGET $SOURCE',
 def exists(env):
   """ Check if the tool exists """
   from SCons.Tool.GettextCommon import _msgfmt_exists
-  return _msgfmt_exists(env)
+  try:
+    return _msgfmt_exists(env)
+  except:
+    return False
 #############################################################################
 
 # Local Variables: