antivirus.conf_writer module

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:

str – updated configuration

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:

str – Configuration file with commented what.

This Page