From 7e55af2811c19b91bdf4494b71be926035956aed Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 28 Mar 2016 16:13:36 +0200 Subject: [PATCH] Fixes #1778 --- lib/core/update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/update.py b/lib/core/update.py index 9be92a530..c88ae74a6 100644 --- a/lib/core/update.py +++ b/lib/core/update.py @@ -5,6 +5,7 @@ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ +import locale import os import re import time @@ -43,7 +44,7 @@ def update(): dataToStdout("\r[%s] [INFO] update in progress " % time.strftime("%X")) try: - process = execute("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=PIPE, stderr=PIPE, cwd=paths.SQLMAP_ROOT_PATH) + process = execute("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=PIPE, stderr=PIPE, cwd=paths.SQLMAP_ROOT_PATH.encode(locale.getpreferredencoding())) # Reference: http://blog.stastnarodina.com/honza-en/spot/python-unicodeencodeerror/ pollProcess(process, True) stdout, stderr = process.communicate() success = not process.returncode