Configuration writer

This module is used to write and update configuration for ClamAV daemon.

antivirus.conf_writer.add_or_update(data, item, value)[source]

Add or update value in configuration file format used by proftpd.

Parameters:
  • data (str) – Configuration file as string.
  • item (str) – What option will be added/updated.
  • value (str) – Value of option.
Returns:

updated configuration

Return type:

str

antivirus.conf_writer.comment(data, what)[source]

Comments line containing what in string data.

Parameters:
  • data (str) – Configuration file in string.
  • what (str) – Line which will be commented out.
Returns:

Configuration file with commented what.

Return type:

str