From 3c3dcfd82b624cf2d430e1308067c115e537b5c7 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Feb 16 2021 04:05:17 +0000 Subject: fix logic --- diff --git a/koji/util.py b/koji/util.py index a981969..a85ec5f 100644 --- a/koji/util.py +++ b/koji/util.py @@ -454,7 +454,9 @@ def rmtree(path, logger=None): try: os.chdir(path) except OSError as e: - if e.errno not in (errno.ENOENT, errno.ESTALE): + if e.errno in (errno.ENOENT, errno.ESTALE): + # likely racing with another rmtree + # if the dir doesn't exist, we're done return raise try: