Initialize msg to avoid unbound locals.
diff --git a/Lib/poplib.py b/Lib/poplib.py
index 592f7df..98b81ce 100644
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -75,6 +75,7 @@
     def __init__(self, host, port = POP3_PORT):
         self.host = host
         self.port = port
+        msg = "getaddrinfo returns an empty list"
         for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
             af, socktype, proto, canonname, sa = res
             try: