Skip to content
Permalink
Browse files
Fix #2708 -- read data files only if config exists
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 31, 2017
1 parent c8be300 commit e98c1cfcf6311e1641a42ea5672374919103b037
Showing with 4 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +3 −1 nikola/nikola.py
@@ -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)

@@ -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')

0 comments on commit e98c1cf

Please sign in to comment.