summaryrefslogtreecommitdiff
path: root/sphinx/util/fileutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/fileutil.py')
-rw-r--r--sphinx/util/fileutil.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/util/fileutil.py b/sphinx/util/fileutil.py
index 7caf40275..fcbc8abe6 100644
--- a/sphinx/util/fileutil.py
+++ b/sphinx/util/fileutil.py
@@ -74,6 +74,10 @@ def copy_asset(source, destination, excluded=lambda path: False, context=None, r
if not os.path.exists(source):
return
+ if renderer is None:
+ from sphinx.util.template import SphinxRenderer
+ renderer = SphinxRenderer()
+
ensuredir(destination)
if os.path.isfile(source):
copy_asset_file(source, destination, context, renderer)