mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
registry: Add a header to the configuration file telling not to edit it.
This commit is contained in:
parent
6a912bbbe2
commit
721cb06dcd
@ -108,9 +108,24 @@ def open_registry(filename, clear=False):
|
||||
_lastModified = time.time()
|
||||
_fd.close()
|
||||
|
||||
CONF_FILE_HEADER = """
|
||||
######
|
||||
# Althrough it is technically possible to do so, we do not recommend that
|
||||
# you edit this file with a text editor.
|
||||
# Whenever possible, do it on IRC using the Config plugin, which
|
||||
# checks values you set are valid before writing them to the
|
||||
# configuration.
|
||||
# Moreover, if you edit this file while the bot is running, your
|
||||
# changes may be lost.
|
||||
######
|
||||
|
||||
|
||||
"""
|
||||
|
||||
def close(registry, filename, private=True):
|
||||
first = True
|
||||
fd = utils.file.AtomicFile(filename)
|
||||
fd.write(CONF_FILE_HEADER)
|
||||
for (name, value) in registry.getValues(getChildren=True):
|
||||
help = value.help()
|
||||
if help:
|
||||
|
Loading…
Reference in New Issue
Block a user