Skip to content
Snippets Groups Projects
Unverified Commit a99b69e3 authored by Max Adamo's avatar Max Adamo
Browse files

fix again kernel detection

parent e6b9c9a0
No related branches found
No related tags found
No related merge requests found
......@@ -61,21 +61,23 @@ def remove_pkg(version_number, prefix, execution_type):
CACHE.update()
CACHE.open()
try:
# maybe this package does not exist in the DB
CACHE[pkg].is_installed
except KeyError:
pass
else:
if execution_type == 'real':
CACHE[pkg].mark_delete(True, True)
try:
CACHE.commit()
except Exception as err: # pylint: disable=W0703
print("Package removal failed [{err}]".format(
err=str(err)))
finally:
CACHE.close()
else:
print('Would have removed {} (noop)'.format(pkg))
if CACHE[pkg].is_installed:
if execution_type == 'real':
CACHE[pkg].mark_delete(True, True)
try:
CACHE.commit()
except Exception as err: # pylint: disable=W0703
print("Package removal failed [{err}]".format(
err=str(err)))
finally:
CACHE.close()
else:
print('Would have removed {} (noop)'.format(pkg))
def get_version(full_pkg_name):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment