config.Mapping: Allow a mapping script to ignore an interface

The ifupdown docs say that a mapping script may produce no output and
exit with an error code to decline to map a particular interface.

Adjust the various permutations of error handling to support that case.

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>
Fix up lots of missing docstrings to make pylint happy

All the file comments should be docstrings instead of commet blocks, and
many functions and classes are missing docstrings as well.

It will take a while to get the code pylint-clean, but this is a good
first start.

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>
Create helper files and scripts for pylint-cleanness

The new run_pylint.sh script automatically runs pylint with the new
pylintrc file on the Python scripts and source directory.

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>
Move ifupdown_ng.args to ifupdown_ng.commands.ARGS

This is a better place for the global variable anyways, and it also
happens to make pylint much happier too.

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>
Refactor and improve config.InterfacesFile

Split the file:line tracking code is to a new class: FilePosition.  This
allows those objects to be cloned so errors occurring after intial
parsing can still be attributed to an appropriate location in the
configuration file(s).

Also, make config.InterfacesFile default to automatically closing the
input files when it's done reading them.  This can be controlled by the
paramter "autoclose=(True|False)".

Finally, add lots of new docstrings.

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>
Cleanup and fix various bugs and pylint warnings

This is a bunch of minor bugfixes and warning cleanups

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>
run_pylint.sh: Allow passing extra options during development

Occasionally we want to suppress certain diagnostics during development,
such as the "Missing docstring" message.

To make that convenient, forward extra options received by run_pylint.sh
along to the various pylint subprocesses.

Signed-off-by: Kyle Moffett <kyle@moffetthome.net>