Do not contest locks in PythonGit

The config writer should be
used in a context manager form to ensure locks are shared and
the data is properly written out. In python 2 it looks as if
the locks were not properly handled and multiple config
writers would just lock the same file (and write) blindly.
In python 3, the context manager is required to not raise
an exception when writing the config due to the lock already
being held by another config_writer.

Change-Id: I42a9804638c6065127ce31a1865b017bf969855f
2 files changed