Skip to content

Commit

Permalink
Fix #2708 -- read data files only if config exists
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 31, 2017
1 parent c8be300 commit e98c1cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -7,6 +7,7 @@ Features
Bugfixes
--------

* Read data files only if Nikola configuration exists (Issue #2708)
* Make ``PAGE_INDEX`` work with ``PRETTY_URLS`` (Issue #2705)
* Fix PHP posts/pages not rendering on Windows (Issue #2706)

Expand Down
4 changes: 3 additions & 1 deletion nikola/nikola.py
Expand Up @@ -986,7 +986,9 @@ def __init__(self, **config):
self.bad_compilers.add(k)

self._set_global_context_from_config()
self._set_global_context_from_data()
# Read data files only if a site exists (Issue #2708)
if self.configured:
self._set_global_context_from_data()

# Set persistent state facility
self.state = Persistor('state_data.json')
Expand Down

0 comments on commit e98c1cf

Please sign in to comment.