diff --git a/sc2gameLobby/ipAddresses.py b/sc2gameLobby/ipAddresses.py
index <HASH>..<HASH> 100644
--- a/sc2gameLobby/ipAddresses.py
+++ b/sc2gameLobby/ipAddresses.py
@@ -53,7 +53,7 @@ def getPublicIPaddress(timeout=c.DEFAULT_TIMEOUT):
     """visible on public internet"""
     start = time.time()
     my_public_ip = None
-    e = None
+    e = Exception
     while my_public_ip == None:
         if time.time() - start > timeout:
             break
- added robustness in case a connection to the internet is lost.