Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebe8ee3 commit 887109aCopy full SHA for 887109a
1 file changed
lib/request/basic.py
@@ -186,8 +186,9 @@ def getHeuristicCharEncoding(page):
186
"""
187
retVal = detect(page)["encoding"]
188
189
- infoMsg = "heuristics detected web page charset '%s'" % retVal
190
- singleTimeLogMessage(infoMsg, logging.INFO, retVal)
+ if retVal:
+ infoMsg = "heuristics detected web page charset '%s'" % retVal
191
+ singleTimeLogMessage(infoMsg, logging.INFO, retVal)
192
193
return retVal
194
0 commit comments