# HG changeset patch # User Augie Fackler # Date 2011-07-26 01:46:30 # Node ID b64538363dbe10d0a49aa4ae37d5c3c72238f5c6 # Parent a2aa75118837f44ec7c42cae9eebfb5b92ecca6e i18n: use getattr instead of hasattr Using getattr instead of util.safehasattr here to avoid adding another dependency for i18n. diff --git a/mercurial/i18n.py b/mercurial/i18n.py --- a/mercurial/i18n.py +++ b/mercurial/i18n.py @@ -9,7 +9,7 @@ import encoding 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 @@ if _plain(): _ = lambda message: message else: _ = gettext -