mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Another update for Issue #52
This commit is contained in:
parent
70f754f6c5
commit
ada627a022
2 changed files with 21 additions and 14 deletions
|
|
@ -35,15 +35,21 @@ def update():
|
|||
logger.debug(debugMsg)
|
||||
|
||||
dataToStdout("\r[%s] [INFO] update in progress " % time.strftime("%X"))
|
||||
process = execute("git pull %s" % rootDir, shell=True, stdout=PIPE, stderr=PIPE)
|
||||
pollProcess(process)
|
||||
stdout, _ = process.communicate()
|
||||
process = execute("gita pull %s" % rootDir, shell=True, stdout=PIPE, stderr=PIPE)
|
||||
pollProcess(process, True)
|
||||
stdout, stderr = process.communicate()
|
||||
|
||||
if not process.returncode:
|
||||
logger.info("%s the latest revision '%s'" % ("already at" if "Already" in stdout else "updated to", REVISION))
|
||||
else:
|
||||
logger.error("update could not be completed (%s)" % repr(stderr))
|
||||
|
||||
if IS_WIN:
|
||||
infoMsg = "for Windows platform it's recommended "
|
||||
infoMsg += "to use a GitHub for Windows client for updating "
|
||||
infoMsg += "purposes (http://windows.github.com/)"
|
||||
else:
|
||||
infoMsg = "for Linux platform it's recommended "
|
||||
infoMsg += "to use a standard 'git' package (e.g.: 'sudo apt-get install git')"
|
||||
|
||||
if IS_WIN:
|
||||
infoMsg = "for Windows platform it's recommended "
|
||||
infoMsg += "to use a GitHub for Windows client for updating "
|
||||
infoMsg += "purposes (http://windows.github.com/)"
|
||||
logger.info(infoMsg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue