summaryrefslogtreecommitdiff
path: root/raphodo/backupfile.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-02 06:51:13 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-02 06:51:13 +0200
commitc5fc6c6030d7d9d1b2af3d5165bebed3decd741b (patch)
treedfacccc9ae0747e53e53e5388b2ecd0623e040c3 /raphodo/backupfile.py
parent77dd64c0757c0191b276e65c24ee9874959790c8 (diff)
New upstream version 0.9.4upstream/0.9.4
Diffstat (limited to 'raphodo/backupfile.py')
-rwxr-xr-xraphodo/backupfile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/raphodo/backupfile.py b/raphodo/backupfile.py
index e83fdd7..34d269f 100755
--- a/raphodo/backupfile.py
+++ b/raphodo/backupfile.py
@@ -28,6 +28,9 @@ import hashlib
from datetime import datetime
import shutil
import logging
+import locale
+# Use the default locale as defined by the LANG variable
+locale.setlocale(locale.LC_ALL, '')
from typing import Optional, Tuple
from gettext import gettext as _
@@ -116,7 +119,7 @@ class BackupFilesWorker(WorkerInPublishPullPipeline, FileCopy):
dest_dir, self.device_name)
os.makedirs(dest_dir)
logging.debug("...backup subfolder created")
- except OSError as inst:
+ except (OSError, PermissionError, FileNotFoundError) as inst:
# There is a minuscule chance directory may have been
# created by another process between the time it
# takes to query and the time it takes to create a