Skip to content

Commit 7e55af2

Browse files
committed
1 parent ad3b766 commit 7e55af2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/core/update.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
See the file 'doc/COPYING' for copying permission
66
"""
77

8+
import locale
89
import os
910
import re
1011
import time
@@ -43,7 +44,7 @@ def update():
4344
dataToStdout("\r[%s] [INFO] update in progress " % time.strftime("%X"))
4445

4546
try:
46-
process = execute("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=PIPE, stderr=PIPE, cwd=paths.SQLMAP_ROOT_PATH)
47+
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/
4748
pollProcess(process, True)
4849
stdout, stderr = process.communicate()
4950
success = not process.returncode

0 commit comments

Comments
 (0)