Unverified Commit a99b69e3 authored by Massimiliano Adamo's avatar Massimiliano Adamo
Browse files

fix again kernel detection

parent e6b9c9a0
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment