`get_instance()` returns two values. Old code, instead of unpacking two
values in two variables, placed the tuple in a single variable
`pelican`.
Later in the same block when `pelican.run()` was called, it resulted in
error.
```
-> Modified: content, theme, settings. re-generating...
CRITICAL: ("'tuple' object has no attribute 'run'",)
CRITICAL: 'tuple' object has no attribute 'run'
Traceback (most recent call last):
File "/Users/talha/Repos/VirtualEnvs/pelican-dev/bin/pelican", line 8,
in <module>
load_entry_point('pelican==3.3', 'console_scripts', 'pelican')()
File
"/Users/talha/Repos/VirtualEnvs/pelican-dev/lib/python2.7/site-packages/pelican-3.3-py2.7.egg/pelican/__init__.py",
line 353, in main pelican.run()
```
Either the returned value should be unpacked properly or
`pelican[0].run` should be called.
The latest version of pip (1.4) no longer installs pre-release versions
(alpha, beta, etc.) by default. Because pytz uses an unorthodox version
number scheme, pip thinks it's a pre-release and skips it. This
change to setup.py should alleviate the problem until it is otherwise
resolved.
Add a `Readers` class which contains a dict of file extensions / `Reader`
instances. This dict can be overwritten with a `READERS` settings, for instance
to avoid processing *.html files:
READERS = {'html': None}
Or to add a custom reader for the `foo` extension:
READERS = {'foo': FooReader}
This dict is no storing the Reader classes as it was done before with
`EXTENSIONS`. It stores the instances of the Reader classes to avoid instancing
for each file reading.
Make deliberate overriding (*) works with overwrites detection.
(*) first introduced by d0e9c52410
The following are decided to be deliberate override:
- articles using the `save_as` metadata
- pages using the `save_as` metadata
- template pages (always)
Pelican now exits in the following 2 cases:
- at least 2 not deliberate writes to the same file name (behaviour introduced
by the overwrite detection feature ff7410ce2a)
- at least 2 deliberate writes to the same file name (new behaviour)
Also added info logging when deliberate overrides are performed.
Switched to StandardError instead of IOError, thanks to @ametaireau and
@russkel.
Deliberate overriding via `save_as` metadata should be allowed, even after the
overwrite detection feature. This commit is to add tests for deliberate
overriding. As a result, the relevant tests *should fail* after this commit.
Added a page and an article, both to override a tag, with very old dates so
it limits the amount of diff in the generated pages.
Overriding feature introduced by d0e9c52410
Overwrite detection introduced by ff7410ce2a