diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2010-12-13 13:36:58 +0100 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2010-12-13 13:36:58 +0100 |
commit | 6417dec44650ef333c94d0ecdb2c848dca088ec3 (patch) | |
tree | 5bd75d2e92efcc2b9d6489e81c3213d067f389e0 /l10ntools/scripts/tool | |
parent | bdccc1a4987cd04ec25d5dcd0c819fb5019a46b0 (diff) |
spc01: improve error handling, catch exception in copy_file
Diffstat (limited to 'l10ntools/scripts/tool')
-rw-r--r-- | l10ntools/scripts/tool/l10ntool.py | 5 |
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 + "'" |