From d7f282cd880e74ed13dc59a117f4f935d38cfb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Wed, 11 Jun 2014 07:32:31 +0000 Subject: [PATCH] added "deprecated" snippet to decorators --- server/src/uds/core/util/Decorators.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/uds/core/util/Decorators.py b/server/src/uds/core/util/Decorators.py index c0ac3168..7a0ab9ed 100644 --- a/server/src/uds/core/util/Decorators.py +++ b/server/src/uds/core/util/Decorators.py @@ -90,6 +90,7 @@ def denyBrowsers(browsers=['ie<9'], errorResponse=lambda request: errors.errorVi return _wrapped_view return wrap +# Snippet based on https://wiki.python.org/moin/PythonDecoratorLibrary#Smart_deprecation_warnings_.28with_valid_filenames.2C_line_numbers.2C_etc..29 def deprecated(func): '''This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted