Mercurial > hg
changeset 2654:c54ecfc360a9
util.getuser: raise exception if win32api not available.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 24 Jul 2006 09:19:25 -0700 |
parents | 8796d9991100 |
children | df5e58c84b01 |
files | mercurial/util.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Mon Jul 24 09:12:16 2006 -0700 +++ b/mercurial/util.py Mon Jul 24 09:19:25 2006 -0700 @@ -517,7 +517,8 @@ try: return getpass.getuser() except ImportError: - return getuser_fallback and getuser_fallback() + if getuser_fallback: + return getuser_fallback() raise util.Abort(_('user name not available - set USERNAME ' 'environment variable'))