Again here, list.remove(foo) fails if foo ain't in list :[

This commit is contained in:
Alexandre Aubin 2020-05-11 00:21:25 +02:00
parent c346f5f1df
commit 43facfd5b5

View file

@ -418,7 +418,8 @@ def service_log(name, number=50):
# Legacy stuff related to --log_type where we'll typically have the service # Legacy stuff related to --log_type where we'll typically have the service
# name in the log list but it's not an actual logfile. Nowadays journalctl # name in the log list but it's not an actual logfile. Nowadays journalctl
# is automatically fetch as well as regular log files. # is automatically fetch as well as regular log files.
log_list.remove(name) if name in log_list:
log_list.remove(name)
result = {} result = {}