commit c90903bc389161215c40378c93e98fc6e028be8a from: Jelmer Vernooij date: Fri Sep 02 10:43:27 2022 UTC Add comment about ignoring errors from shutil.rmtree. commit - d8a882709f0f42d98954b901afeacbbf250a11c5 commit + c90903bc389161215c40378c93e98fc6e028be8a blob - 02ff4d0237573674c12b8879dc8cdcb4dc597bde blob + 19420dd6c32c51f52bc16824822cf29326369fc0 --- dulwich/tests/test_porcelain.py +++ dulwich/tests/test_porcelain.py @@ -277,6 +277,9 @@ ya6JVZCRbMXfdCy8lVPgtNQ6VlHaj8Wvnn2FLbWWO2n2r3s= super(PorcelainGpgTestCase, self).setUp() self.gpg_dir = os.path.join(self.test_dir, "gpg") os.mkdir(self.gpg_dir, mode=0o700) + # Ignore errors when deleting GNUPGHOME, because of race conditions + # (e.g. the gpg-agent socket having been deleted). See + # https://github.com/jelmer/dulwich/issues/1000 self.addCleanup(shutil.rmtree, self.gpg_dir, ignore_errors=True) self._old_gnupghome = os.environ.get("GNUPGHOME") os.environ["GNUPGHOME"] = self.gpg_dir