Initialize msg to avoid unbound locals.
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 1038831..7ab9149 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -357,6 +357,7 @@
 
     def connect(self):
         """Connect to the host and port specified in __init__."""
+        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: