Should fix broken Travis

This commit is contained in:
Miroslav Stampar
2020-02-06 22:52:45 +01:00
parent 6825bf85a4
commit 19e08416b5
4 changed files with 5 additions and 12 deletions

View File

@@ -4,7 +4,6 @@
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
from __future__ import print_function
import codecs
import gzip
@@ -239,12 +238,8 @@ def checkCharEncoding(encoding, warn=True):
if encoding:
try:
_ = getBytes(randomStr())
print(repr(_))
print(encoding)
six.text_type(_, encoding)
except Exception as ex:
print(getSafeExString(ex))
six.text_type(getBytes(randomStr()), encoding)
except:
if warn:
warnMsg = "invalid web page charset '%s'" % encoding
singleTimeLogMessage(warnMsg, logging.WARN, encoding)