Refactor: Remove unnecessary else after return in audit function

This commit is contained in:
2025-12-29 13:02:18 +01:00
parent 9e5b9b6677
commit 84c736c703

View File

@@ -121,14 +121,14 @@ def audit():
print(message)
#send_to_rocket(message)
return "OK"
else:
message=f"You need to update some packages :\n"
for app in list_app_to_update:
message += f"**{app['package']}** : {app['new_version']} from : {app['old_version']}\n"
print(message)
#send_to_rocket(message)
send_email("Some application need to be updated on your wapt server",message)
return "WARNING"
message=f"You need to update some packages :\n"
for app in list_app_to_update:
message += f"**{app['package']}** : {app['new_version']} from : {app['old_version']}\n"
print(message)
#send_to_rocket(message)
send_email("Some application need to be updated on your wapt server",message)
return "WARNING"
def send_to_rocket(message_text, attachments=None):