jasonmcintosh / rabbitmq-zabbix

Zabbix RabbitMQ Configuration
Apache License 2.0
251 stars 168 forks source link

Work with memory buffer instead of temporary file #97

Closed Bouke closed 6 years ago

Bouke commented 6 years ago

On my environment, all machines are locked down with selinux. The script writes to a temporary file, which requires an exception from selinux. Instead, I've opted to work with an in-memory buffer, so no files need to be written to disk. I've left most of the buffer intact, as StringIO supports file-like operations (write / close etc).