# HG changeset patch # User Vadim Gelfer # Date 1153758167 25200 # Node ID df5e58c84b010bcf83cb12ed106fae74d3b0da5b # Parent c54ecfc360a958309a13c0e6fa72047d1dcdba23 util.getuser: better comments diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -517,10 +517,12 @@ def getuser(): try: return getpass.getuser() except ImportError: + # import of pwd will fail on windows - try fallback if getuser_fallback: return getuser_fallback() - raise util.Abort(_('user name not available - set USERNAME ' - 'environment variable')) + # raised if win32api not available + raise Abort(_('user name not available - set USERNAME ' + 'environment variable')) # Platform specific variants if os.name == 'nt':