summaryrefslogtreecommitdiff
path: root/obnamlib/encryption.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-10-27 19:21:35 +0300
committerLars Wirzenius <liw@liw.fi>2016-10-27 19:21:35 +0300
commit82ad0c0dc5b9b09577c4086ad23e0fa48cc0845a (patch)
tree971127de7450745522be63eb62ebd90b7aced86a /obnamlib/encryption.py
parentb1967189ea3e054305977cb586825bf222a05863 (diff)
downloadobnam-82ad0c0dc5b9b09577c4086ad23e0fa48cc0845a.tar.gz
Ignore errors when removing temporary dirs for testing
Due to some interaction with gpg-agent in gpg 2.1, autospawning of said agent, and a socket file it creates and removes, rmtree would previously fail due to the socket having disappeared. Mysterious, but works now.
Diffstat (limited to 'obnamlib/encryption.py')
-rw-r--r--obnamlib/encryption.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/obnamlib/encryption.py b/obnamlib/encryption.py
index 45611401..35ac1da2 100644
--- a/obnamlib/encryption.py
+++ b/obnamlib/encryption.py
@@ -180,7 +180,7 @@ class Keyring(object):
''', gpghome=self._gpghome)
def _cleanup(self):
- shutil.rmtree(self._gpghome)
+ shutil.rmtree(self._gpghome, ignore_errors=True)
self._gpghome = None
@property