def __write_config(self):
"""Save the repository's current configuration data."""
# No changes should be written to disk in readonly mode.
if self.read_only:
return
# Save a new configuration (or refresh existing).
try:
self.cfg.write()
except EnvironmentError as e:
# If we're unable to write due to the following
# errors, it isn't critical to the operation of
# the repository.
if e.errno not in (errno.EPERM, errno.EACCES,
errno.EROFS):
raise
评论列表
文章目录