summaryrefslogtreecommitdiff
path: root/raphodo/backupfile.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-02 06:52:34 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-02 06:52:34 +0200
commit513be823a8729f783995bea495273a19cd0d2bbf (patch)
treee0d7e1ffdb1ea25163e84f45108591497d480bee /raphodo/backupfile.py
parentb0583b33e83be9cca6369d980eb82dee3a907c28 (diff)
parentc5fc6c6030d7d9d1b2af3d5165bebed3decd741b (diff)
Updated version 0.9.4 from 'upstream/0.9.4'
with Debian dir 31043f20abb0a924130b658a2ff3b5cbcbf689d9
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