Mercurial > piecrust2
diff piecrust/baking/single.py @ 833:cb39c0dbe5f0
Merge pull request #40 from GitHub.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 05 Feb 2017 22:42:18 -0800 |
parents | 18978cf6d1ac |
children | dca51cd8147a |
line wrap: on
line diff
--- a/piecrust/baking/single.py Sun Feb 05 22:37:25 2017 -0800 +++ b/piecrust/baking/single.py Sun Feb 05 22:42:18 2017 -0800 @@ -1,6 +1,5 @@ import os.path import queue -import shutil import logging import threading import urllib.parse @@ -167,14 +166,7 @@ logger.debug("Copying page assets to: %s" % out_assets_dir) _ensure_dir_exists(out_assets_dir) - page_pathname, _ = os.path.splitext(qualified_page.path) - in_assets_dir = page_pathname + ASSET_DIR_SUFFIX - for fn in os.listdir(in_assets_dir): - full_fn = os.path.join(in_assets_dir, fn) - if os.path.isfile(full_fn): - dest_ap = os.path.join(out_assets_dir, fn) - logger.debug(" %s -> %s" % (full_fn, dest_ap)) - shutil.copy(full_fn, dest_ap) + qualified_page.source.buildAssetor(qualified_page, sub_uri).copyAssets(out_assets_dir) # Figure out if we have more work. has_more_subs = False