plugins/python/example_io_plugin: close the file at destroy
to avoid warning of debug python build.
This commit is contained in:

committed by
Todd C. Miller

parent
a3a7630ff4
commit
4110800c14
@@ -63,6 +63,7 @@ class SudoIOPlugin(sudo.Plugin):
|
||||
def __del__(self):
|
||||
if hasattr(self, "_log_file"):
|
||||
self._log("", "-- Plugin DESTROYED --")
|
||||
self._log_file.close()
|
||||
|
||||
def open(self, argv: Tuple[str, ...], command_info: Tuple[str, ...]) -> int:
|
||||
"""Receives the command the user wishes to run.
|
||||
|
Reference in New Issue
Block a user