Skip to content

Commit dac0a62

Browse files
committedSep 17, 2015
Don’t check in outut to see if robots exsit (Issue #2098)
1 parent 6d0e313 commit dac0a62

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed
 

‎CHANGES.txt

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
New in Master
2+
=============
3+
4+
Features
5+
--------
6+
7+
Bugfixes
8+
--------
9+
10+
* /robots.txt was never being built (Issue #2098)
11+
112
New in v7.7.1
213
=============
314

‎nikola/plugins/task/robots.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def write_robots():
7171

7272
yield self.group_task()
7373

74-
if not utils.get_asset_path("robots.txt", [], files_folders=kw["files_folders"]):
74+
if not utils.get_asset_path("robots.txt", [], files_folders=kw["files_folders"], output_dir=False):
7575
yield utils.apply_filters({
7676
"basename": self.name,
7777
"name": robots_path,

‎nikola/utils.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,10 @@ def get_asset_path(path, themes, files_folders={'files': ''}, _themes_dir='theme
10021002
if os.path.isfile(candidate):
10031003
return candidate
10041004

1005-
candidate = os.path.join(output_dir, path)
1006-
if os.path.isfile(candidate):
1007-
return candidate
1005+
if output_dir:
1006+
candidate = os.path.join(output_dir, path)
1007+
if os.path.isfile(candidate):
1008+
return candidate
10081009

10091010
# whatever!
10101011
return None

0 commit comments

Comments
 (0)
Failed to load comments.