spc01: improve error handling, catch exception in copy_file
This commit is contained in:
parent
bdccc1a498
commit
6417dec446
1 changed files with 5 additions and 0 deletions
|
@ -116,6 +116,11 @@ class AbstractL10nTool:
|
|||
return self._options.inputfile[0] == '@'
|
||||
|
||||
def copy_file(self, inputfilename, outputfilename):
|
||||
try:
|
||||
os.remove(outputfilename)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
shutil.copy(inputfilename, outputfilename)
|
||||
except IOError:
|
||||
|
|
Loading…
Reference in a new issue