You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting a deprecation warning exception from the API.
[09:26:25] [DEBUG] [672f3e0a357d3896] Retrieved scan status
[09:26:25] [DEBUG] [672f3e0a357d3896] Retrieved scan log messages
[09:26:42] [DEBUG] [672f3e0a357d3896] Retrieved scan status
/home/baal/bin/python/sqlmap/lib/core/common.py:4426: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
if getattr(ex, "message", None):
/home/baal/bin/python/sqlmap/lib/core/common.py:4427: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
retVal = ex.message
[09:26:46] [DEBUG] [672f3e0a357d3896] Retrieved scan log messages
def getSafeExString(ex, encoding=None):
"""
Safe way how to get the proper exception represtation as a string
(Note: errors to be avoided: 1) "%s" % Exception(u'\u0161') and 2) "%s" % str(Exception(u'\u0161'))
>>> getSafeExString(Exception('foobar'))
u'foobar'
"""
retVal = ex
if getattr(ex, "message", None):
retVal = ex.message
elif getattr(ex, "msg", None):
retVal = ex.msg
return getUnicode(retVal or "", encoding=encoding).strip()
It's not really a bug, but eventually it will be deprecated so thought I'd bring it to your attention
"Patched" with latest commit. Don't you worry for deprecation as you can see in code that there is a check for the existence of message before its usage.
Activity
Ekultek commentedon Sep 9, 2017
Comes from here:
It's not really a bug, but eventually it will be deprecated so thought I'd bring it to your attention
stamparm commentedon Sep 9, 2017
"Patched" with latest commit. Don't you worry for deprecation as you can see in code that there is a check for the existence of
messagebefore its usage.Ekultek commentedon Sep 9, 2017
Yeah I saw that, just thought I'd bring it to your attention just in case, thank you for the 'patch'.