This commit is contained in:
Miroslav Stampar
2019-05-19 07:44:32 +02:00
parent c83ccfc5a9
commit 9fd5fe732c
2 changed files with 3 additions and 5 deletions

View File

@@ -10,7 +10,6 @@ import os
import re
import shutil
import subprocess
import sys
import time
import zipfile
@@ -29,7 +28,6 @@ from lib.core.settings import GIT_REPOSITORY
from lib.core.settings import IS_WIN
from lib.core.settings import VERSION
from lib.core.settings import ZIPBALL_PAGE
from lib.core.settings import UNICODE_ENCODING
from thirdparty.six.moves import urllib as _urllib
def update():
@@ -108,11 +106,11 @@ def update():
dataToStdout("\r[%s] [INFO] update in progress" % time.strftime("%X"))
try:
process = subprocess.Popen("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=paths.SQLMAP_ROOT_PATH.encode(sys.getfilesystemencoding() or UNICODE_ENCODING))
process = subprocess.Popen("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=paths.SQLMAP_ROOT_PATH)
pollProcess(process, True)
output, _ = process.communicate()
success = not process.returncode
except (IOError, OSError) as ex:
except Exception as ex:
success = False
output = getSafeExString(ex)
finally: