diff --git a/koji/util.py b/koji/util.py index 947ed18e..31c32ba5 100644 --- a/koji/util.py +++ b/koji/util.py @@ -472,7 +472,7 @@ def rmtree(path, logger=None, background=False): def _rmtree_check(): if not background: - # caller will wait + # caller will wait in background case _pid, status = os.waitpid(pid, 0) try: SimpleProxyLogger.send(logfile, logger) @@ -483,7 +483,7 @@ def rmtree(path, logger=None, background=False): except Exception: pass if not background: - # caller should check status + # caller should check status in background case if not isSuccess(status): raise koji.GenericError(parseStatus(status, "rmtree process")) if os.path.exists(path): diff --git a/tests/test_lib/test_utils.py b/tests/test_lib/test_utils.py index 7acfc5a2..7552797c 100644 --- a/tests/test_lib/test_utils.py +++ b/tests/test_lib/test_utils.py @@ -1607,7 +1607,7 @@ class TestRmtree2(unittest.TestCase): koji.util.rmtree(dirname) def test_rmtree_notadir(self): - # should not error if already removed + # should error if not a directory fname = '%s/hello.txt' % self.tempdir with open(fname, 'wt') as fo: fo.write('hello\n')