From af3e41e4ebb23fc08a5fc673ad8d1f2e297338a2 Mon Sep 17 00:00:00 2001 From: Toshi Aoyama Date: Mon, 15 Apr 2019 12:52:52 +0000 Subject: [PATCH] Fix EventError argument for logging IOError correctly --- azurelinuxagent/common/event.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azurelinuxagent/common/event.py b/azurelinuxagent/common/event.py index 4ad441e6af..0f3580c13c 100644 --- a/azurelinuxagent/common/event.py +++ b/azurelinuxagent/common/event.py @@ -225,7 +225,8 @@ def save_event(self, data): hfile.write(data.encode("utf-8")) os.rename(filename + ".tmp", filename + ".tld") except IOError as e: - raise EventError("Failed to write events to file:{0}", e) + msg = "Failed to write events to file:{0}".format(e) + raise EventError(msg) def reset_periodic(self): self.periodic_events = {}