summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pysnmp/proto/api/v1.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pysnmp/proto/api/v1.py b/pysnmp/proto/api/v1.py
index 149da74..fdc458a 100644
--- a/pysnmp/proto/api/v1.py
+++ b/pysnmp/proto/api/v1.py
@@ -107,7 +107,7 @@ apiPDU = PDUAPI()
class TrapPDUAPI:
try:
- from socket import gethostbyname
+ import socket
agentAddress = IpAddress(socket.gethostbyname(socket.gethostname()))
except:
agentAddress = IpAddress('0.0.0.0')