Mercurial > hg-stable
diff mercurial/commands.py @ 21937:54ff2789d75e stable
version: don't traceback if no extensions to list (issue4312)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 23 Jul 2014 11:16:22 -0500 |
parents | 5bd11162c0a4 |
children | 9209c02f1f25 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jul 23 10:50:21 2014 -0500 +++ b/mercurial/commands.py Wed Jul 23 11:16:22 2014 -0500 @@ -6026,6 +6026,7 @@ for name, module in extensions.extensions(): names.append(name) vers.append(extensions.moduleversion(module)) - maxnamelen = max(len(n) for n in names) - for i, name in enumerate(names): - ui.write(" %-*s %s\n" % (maxnamelen, name, vers[i])) + if names: + maxnamelen = max(len(n) for n in names) + for i, name in enumerate(names): + ui.write(" %-*s %s\n" % (maxnamelen, name, vers[i]))