Fixing DeprecationWarning (logger.warn)

This commit is contained in:
Miroslav Stampar
2022-06-22 12:04:34 +02:00
parent 90b444c927
commit df4293473d
99 changed files with 429 additions and 428 deletions

View File

@@ -36,6 +36,7 @@ try:
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
else:
warnings.resetwarnings()
warnings.simplefilter("ignore", category=ResourceWarning, append=1)
warnings.filterwarnings(action="ignore", message="Python 2 is no longer supported")
warnings.filterwarnings(action="ignore", message=".*was already imported", category=UserWarning)
@@ -533,7 +534,7 @@ def main():
if getDaysFromLastUpdate() > LAST_UPDATE_NAGGING_DAYS:
warnMsg = "your sqlmap version is outdated"
logger.warn(warnMsg)
logger.warning(warnMsg)
if conf.get("showTime"):
dataToStdout("\n[*] ending @ %s\n\n" % time.strftime("%X /%Y-%m-%d/"), forceOutput=True)