Fixes: https://pagure.io/koji/issue/3042
rebased onto bf6b4ce618b2bea0708668f1b57a3ea37976da5d
koji.util.rmtree doesn't support GLOB path
koji.util.rmtree
1 new commit added
fix unlinking
It might be helpful to add banditinto envlist of tox.ini and Makefile. Otherwise :thumbsup:
bandit
envlist
tox.ini
Makefile
rebased onto 8fdd52ca727038df79b3478da9e0b29a0ca82644
pretty please pagure-ci rebuild
it's not called this time
This is different.rm -rf will not raise an error. os.unlink() will raise if the file is already gone (eg. race conditions). I recommend you wrap the unlink() call in try/catch FileNotFoundError.
rm -rf
os.unlink()
unlink()
try
catch FileNotFoundError
How about a comment here explaining why we're skipping all of these?
Why are we silencing the warnings here?
Removing code! :rocket:
Actually catching and ignoring parent OSError would be better than FileNotFoundError. The original os.system('rm -rf ...') code would not raise in a variety of cases.
OSError
FileNotFoundError
os.system('rm -rf ...')
rebased onto 9c505b0072cf613468d8742c5993f3f70d8f8a10
Updated, I've removed most of the skipped tests and replaced them with # nosec.
# nosec
rebased onto 390e98d14b5e6b181286e1f75d84eeb4b17e19ee
I've replaced urlopen with requests. Anyway, it depends if we don't want to drop koji-shadow completely (#2873)
Metadata Update from @tkopecek: - Pull-request tagged with: no_qe
remove unused imports
unittest failed now, as it watches os.path.join(rootdir, '/var/lib/rpm/__db*')
os.path.join(rootdir, '/var/lib/rpm/__db*')
fix test
:thumbsup:
Commit a90552af fixes this pull-request
Pull-Request has been merged by tkopecek
Fixes: https://pagure.io/koji/issue/3042