Mercurial > piecrust2
diff piecrust/commands/builtin/info.py @ 5:474c9882decf
Upgrade to Python 3.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 11 Aug 2014 22:36:47 -0700 |
parents | f485ba500df3 |
children | 10fc9c8bf682 |
line wrap: on
line diff
--- a/piecrust/commands/builtin/info.py Mon Aug 11 22:36:36 2014 -0700 +++ b/piecrust/commands/builtin/info.py Mon Aug 11 22:36:47 2014 -0700 @@ -106,7 +106,7 @@ sources = list(ctx.app.sources) if ctx.args.endpoint: endpoints = ctx.args.endpoint - sources = filter(lambda s: s.endpoint in endpoints, sources) + sources = [s for s in sources if s.endpoint in endpoints] for src in sources: page_facs = src.getPageFactories() for pf in page_facs: @@ -116,7 +116,7 @@ name = pf.path if ctx.args.metadata: logger.info("path:%s" % pf.path) - for key, val in pf.metadata.iteritems(): + for key, val in pf.metadata.items(): logger.info("%s:%s" % (key, val)) logger.info("---") else: