Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Massimiliano Adamo
ubuntu-kernel-cleanup
Commits
e26c7bb0
Unverified
Commit
e26c7bb0
authored
Feb 03, 2021
by
Massimiliano Adamo
Browse files
warn only if cache update fails
parent
45f95ed1
Changes
1
Hide whitespace changes
Inline
Side-by-side
ubuntu-kernel-cleanup.py
View file @
e26c7bb0
...
...
@@ -61,7 +61,10 @@ def process_packages(version_number, prefix, execution_type):
for
suffix
in
KERNEL_SUFFIXES
:
pkg
=
"{}-{}{}"
.
format
(
prefix
,
version_number
,
suffix
)
if
execution_type
==
'real'
:
CACHE
.
update
()
try
:
CACHE
.
update
()
except
apt
.
cache
.
FetchFailedException
as
err
:
print
(
"failed to fetch some repository: {}"
.
format
(
err
))
CACHE
.
open
()
try
:
CACHE
[
pkg
].
is_installed
# maybe the package does not exist
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment