do not show headers when there are no headers
authorChristian Weiske <cweiske@cweiske.de>
Fri, 2 Dec 2011 16:20:28 +0000 (17:20 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 2 Dec 2011 16:20:28 +0000 (17:20 +0100)
src/CurlyTx.py

index 50b55b0..16d1e31 100644 (file)
@@ -202,7 +202,7 @@ class CurlyTx(Screen,HelpableScreen):
             self["text"].setText(self.pageContent)
             self.pageContent    = None
             self.showingHeaders = False
-        else:
+        elif self.httpGetterFactory.response_headers:
             headers = _("HTTP response headers for") + "\n" + self.currentUrl + "\n\n"
             for (k, v) in self.httpGetterFactory.response_headers.items():
                 headers += k + ": " + ("\n" + k + ": ").join(v) + "\n"