diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py
index 442dc3b4877336d68513347bd84ba07db006d1b8..7f7daf1f7e2880b6f58e5d84b0c20152963466b9 100644
--- a/sickbeard/helpers.py
+++ b/sickbeard/helpers.py
@@ -1396,7 +1396,7 @@ def getURL(url, post_data=None, params={}, headers={}, timeout=30, session=None,
         return
 
     attempts = 0
-    while(gzip and len(response.content) > 1 and resp.content[0] == '\x1f' and resp.content[1] == '\x8b' and attempts < 3):
+    while(gzip and len(resp.content) > 1 and resp.content[0] == '\x1f' and resp.content[1] == '\x8b' and attempts < 3):
         attempts += 1
         resp._content = gzip.GzipFile(fileobj=_StringIO(resp.content)).read()