i18n: use getattr instead of hasattr
Using getattr instead of util.safehasattr here to avoid adding another
dependency for i18n.
--- a/mercurial/i18n.py Mon Jul 25 16:09:18 2011 -0500
+++ b/mercurial/i18n.py Mon Jul 25 20:46:30 2011 -0500
@@ -9,7 +9,7 @@
import gettext, sys, os
# modelled after templater.templatepath:
-if hasattr(sys, 'frozen'):
+if getattr(sys, 'frozen', None) is not None:
module = sys.executable
else:
module = __file__
@@ -61,4 +61,3 @@
_ = lambda message: message
else:
_ = gettext
-