Mercurial > hg
changeset 14975:b64538363dbe
i18n: use getattr instead of hasattr
Using getattr instead of util.safehasattr here to avoid adding another
dependency for i18n.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 20:46:30 -0500 |
parents | a2aa75118837 |
children | 04a950b1c2ad |
files | mercurial/i18n.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 -