Refuse to alter read-only elements at runtime
authorJeremy Stanley <fungi@yuggoth.org>
Mon, 31 Jul 2017 15:00:33 +0000 (15:00 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Mon, 31 Jul 2017 15:00:33 +0000 (15:00 +0000)
In the Element.set() method, check whether the element being altered
is from a read-only file. That should only ever happen when
(re)loading of files is underway, either at start time or because
the reload command/SIGHUP has been issued. If an attempt is made to
change a read-only element at any other time, raise a
PermissionError exception instead of setting the new value in memory
(altered values were never written to the backing file, but prior to
this it was possible to modify the in-memory copies).


No differences found