summaryrefslogtreecommitdiff
path: root/l10ntools/scripts
diff options
context:
space:
mode:
authorJuergen Schmidt <jsc@openoffice.org>2010-12-13 13:36:58 +0100
committerJuergen Schmidt <jsc@openoffice.org>2010-12-13 13:36:58 +0100
commit6417dec44650ef333c94d0ecdb2c848dca088ec3 (patch)
tree5bd75d2e92efcc2b9d6489e81c3213d067f389e0 /l10ntools/scripts
parentbdccc1a4987cd04ec25d5dcd0c819fb5019a46b0 (diff)
spc01: improve error handling, catch exception in copy_file
Diffstat (limited to 'l10ntools/scripts')
-rw-r--r--l10ntools/scripts/tool/l10ntool.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py
index f1630027ccdc..b44306717b20 100644
--- a/l10ntools/scripts/tool/l10ntool.py
+++ b/l10ntools/scripts/tool/l10ntool.py
@@ -117,6 +117,11 @@ class AbstractL10nTool:
def copy_file(self, inputfilename, outputfilename):
try:
+ os.remove(outputfilename)
+ except:
+ pass
+
+ try:
shutil.copy(inputfilename, outputfilename)
except IOError:
print "ERROR: Can not copy file '" + inputfilename + "' to " + "'" + outputfilename + "'"