From 5346ecbb5626e60e1ccd184f52ec19da83f1ba9d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 12 Apr 2011 14:25:17 +0000 Subject: [PATCH] fix for a "accept certificate first time for svn" --- lib/core/update.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/lib/core/update.py b/lib/core/update.py index 6c1f2150f..085459589 100644 --- a/lib/core/update.py +++ b/lib/core/update.py @@ -74,24 +74,19 @@ def update(): debugMsg = "sqlmap will try to update itself using 'svn' command" logger.debug(debugMsg) - process = execute("svn update %s" % rootDir, shell=True, stdout=PIPE, stderr=PIPE) - dataToStdout("\r[%s] [INFO] update in progress " % time.strftime("%X")) + process = execute("svn update %s" % rootDir, shell=True, stdout=PIPE) pollProcess(process) - svnStdout, svnStderr = process.communicate() + svnStdout, _ = process.communicate() - if svnStderr: - errMsg = getUnicode(svnStderr, system=True).strip() - logger.error(errMsg) - - if IS_WIN: - infoMsg = "for Windows platform it's recommended " - infoMsg += "to use a TortoiseSVN GUI client for updating " - infoMsg += "purposes (http://tortoisesvn.net/)" - logger.info(infoMsg) - - elif svnStdout: + if svnStdout: revision = re.search("revision\s+([\d]+)", svnStdout, re.I) if revision: logger.info('updated to the latest revision %s' % revision.group(1)) + + if IS_WIN: + infoMsg = "for Windows platform it's recommended " + infoMsg += "to use a TortoiseSVN GUI client for updating " + infoMsg += "purposes (http://tortoisesvn.net/)" + logger.info(infoMsg)