mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
fix python error when using path with special chars in Processing/GRASS
This commit is contained in:
parent
102f6d3100
commit
80a65b9b1a
@ -165,7 +165,7 @@ class GrassUtils:
|
||||
output.write('g.gisenv.exe set="GISDBASE=' + gisdbase + '"\n')
|
||||
output.write('g.gisenv.exe set="GRASS_GUI=text"\n')
|
||||
for command in commands:
|
||||
output.write(command + '\n')
|
||||
output.write(command.encode('utf8') + '\n')
|
||||
output.write('\n')
|
||||
output.write('exit\n')
|
||||
output.close()
|
||||
@ -174,7 +174,7 @@ class GrassUtils:
|
||||
def createGrassBatchJobFileFromGrassCommands(commands):
|
||||
fout = codecs.open(GrassUtils.grassBatchJobFilename(), 'w', encoding='utf-8')
|
||||
for command in commands:
|
||||
fout.write(command + '\n')
|
||||
fout.write(command.encode('utf8') + '\n')
|
||||
fout.write('exit')
|
||||
fout.close()
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ class Grass7Utils:
|
||||
output.write('g.gisenv.exe set="GISDBASE=' + gisdbase + '"\n')
|
||||
output.write('g.gisenv.exe set="GRASS_GUI=text"\n')
|
||||
for command in commands:
|
||||
output.write(command + '\n')
|
||||
output.write(command.encode('utf8') + '\n')
|
||||
output.write('\n')
|
||||
output.write('exit\n')
|
||||
output.close()
|
||||
@ -172,7 +172,7 @@ class Grass7Utils:
|
||||
def createGrass7BatchJobFileFromGrass7Commands(commands):
|
||||
fout = open(Grass7Utils.grassBatchJobFilename(), 'w')
|
||||
for command in commands:
|
||||
fout.write(command + '\n')
|
||||
fout.write(command.encode('utf8') + '\n')
|
||||
fout.write('exit')
|
||||
fout.close()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user