Merge pull request #12 from sunwukonga/hotfix-kidiff_gui

Remove `_escape_string` call from `kidiff_gui` #11
This commit is contained in:
John 2020-05-27 10:41:05 +01:00 committed by GitHub
commit 493d57f302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -673,7 +673,7 @@ def getGitPath(prjctName, prjctPath):
gitRoot = stdout.decode('utf-8')
gitPathCmd = 'cd ' + _escape_string(gitRoot) + ' && ' + gitProg + ' ls-tree -r --name-only HEAD | ' + grepProg + ' -m 1 ' + prjctName
gitPathCmd = 'cd ' + gitRoot + ' && ' + gitProg + ' ls-tree -r --name-only HEAD | ' + grepProg + ' -m 1 ' + prjctName
gitPathProcess = Popen(
gitPathCmd,

View File

@ -32,6 +32,8 @@ socketserver.TCPServer.allow_reuse_address = True
if sys.version_info[0] >= 3:
unicode = str
executablePath = os.path.dirname(os.path.realpath(__file__))
def _escape_string( val ):
# Make unicode
val = unicode( val )
@ -53,7 +55,7 @@ svnProg = '/usr/bin/svn'
plotDir = '/plots'
webDir = '/web'
diffProg = '/usr/bin/diff'
plotProg = '/home/spendless/sandpit/KiCad-Diff/plotPCB.py'
plotProg = executablePath + '/plotPCB.py'
# plotProg = '/usr/local/bin/plotPCB.py'
# plotProg = '/usr/local/bin/plotPCB_macOS.py'
grepProg = '/usr/bin/grep'
@ -1166,7 +1168,9 @@ def makeSVG(d1, d2, prjctName, prjctPath):
close_fds=True)
stdout, stderr = plot1.communicate()
plotDims1 = (stdout.decode('utf-8').splitlines())
errors = stderr.decode('utf-8')
if errors != "":
print("Plot1 error: " + errors)
plot2=Popen(
plot2Cmd,
@ -1177,6 +1181,9 @@ def makeSVG(d1, d2, prjctName, prjctPath):
close_fds=True)
stdout, stderr = plot2.communicate()
plotDims2 = (stdout.decode('utf-8').splitlines())
errors = stderr.decode('utf-8')
if errors != "":
print("Plot2 error: " + errors)
plot1.wait(); plot2.wait()