Skip to content

Commit

Permalink
Fix EventError argument for logging IOError correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
taoyama committed Apr 16, 2019
1 parent 4c7c892 commit af3e41e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion azurelinuxagent/common/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit af3e41e

Please sign in to comment.