Skip to content

Commit

Permalink
Merge pull request #181 from davidraker/errno_fix
Browse files Browse the repository at this point in the history
Fixed uncaught exception when host is unreachable.
  • Loading branch information
craig8 committed Sep 29, 2023
2 parents b8c727c + 28f1648 commit 0fec9ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/volttron/client/vip/agent/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def __repr__(self):

@classmethod
def from_errno(cls, errnum, msg, *args):
errnum = int(errnum)
try:
errnum = getattr(errno, errnum.split('.')[-1])
except ValueError:
return cls(999, msg, *args)
return {
errno.EHOSTUNREACH: Unreachable,
errno.EAGAIN: Again,
Expand Down

0 comments on commit 0fec9ac

Please sign in to comment.