fedora-helper: Do not fail if unlink() fails
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
979ccdb601
commit
8fee5adf47
1 changed files with 4 additions and 1 deletions
|
@ -131,7 +131,10 @@ def get_binary_license(ctx, source, add, verbose):
|
||||||
if repo.iscontiguous():
|
if repo.iscontiguous():
|
||||||
repo.empty()
|
repo.empty()
|
||||||
repo.add_solv(tmp.name)
|
repo.add_solv(tmp.name)
|
||||||
os.unlink(cache_file)
|
try:
|
||||||
|
os.unlink(cache_file)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
os.link(tmp.name, cache_file)
|
os.link(tmp.name, cache_file)
|
||||||
|
|
||||||
repo_local = pool.add_repo("local")
|
repo_local = pool.add_repo("local")
|
||||||
|
|
Loading…
Reference in a new issue