From 83a2fc901136b9da68f50a5a2c9ae1f45dbf5e97 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 16 Apr 2022 19:06:20 +0200 Subject: salt-minion: T4364: issue warning - do not use sha1 hashing algorithm --- python/vyos/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/base.py b/python/vyos/base.py index fd22eaccd..78067d5b2 100644 --- a/python/vyos/base.py +++ b/python/vyos/base.py @@ -1,4 +1,4 @@ -# Copyright 2018-2021 VyOS maintainers and contributors +# Copyright 2018-2022 VyOS maintainers and contributors # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -15,6 +15,12 @@ from textwrap import fill +class Warning(): + def __init__(self, message): + # Reformat the message and trim it to 72 characters in length + message = fill(message, width=72) + print(f'\nWARNING: {message}') + class DeprecationWarning(): def __init__(self, message): # Reformat the message and trim it to 72 characters in length -- cgit v1.2.3