getnikola/nikola — pull request #1546 by felixfontein (2014-12-22 22:07:25+00:00)
Title: Improving/fixing check command

Hi!

While trying to run ```nikola check``` resp. ```nikola orphans``` with ```--conf=xxx```, I noticed that the result was not as expected, because ```nikola/plugins/command/check.py``` is calling ````nikola``` without passing the configuration file name (I guess I missed that back then when I added ```--conf=xxx```).

While fixing that, I migrated the use of ```os.popen``` to ```subprocess.Popen```.

I also noticed that on my machine (with Python 3), link checking didn't work because ```lxml.html.fromstring()``` didn't like the output of ```open(filename).read()``` (the result was unicode, but since the output contained an encoding specification, ```fromstring()``` bailed out); maybe that's a Python 3 problem, but anyway, when opening the file with mode ```"rb"```, the problem disappeared.

Cheers,
Felix