diff piecrust/sources/mixins.py @ 885:13e8b50a2113

publish: Fix publishers API and add a simple "copy" publisher.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 20 Jun 2017 21:12:35 -0700
parents fddaf43424e2
children
line wrap: on
line diff
--- a/piecrust/sources/mixins.py	Tue Jun 20 21:10:39 2017 -0700
+++ b/piecrust/sources/mixins.py	Tue Jun 20 21:12:35 2017 -0700
@@ -21,8 +21,8 @@
         spec_no_ext, _ = os.path.splitext(item.spec)
         assets_dir = spec_no_ext + assets_suffix
         try:
-            asset_files = osutil.listdir(assets_dir)
-        except OSError:
+            asset_files = list(osutil.listdir(assets_dir))
+        except (OSError, FileNotFoundError):
             return None
 
         assets = []