diff options
author | Chris Dent <cdent@anticdent.org> | 2023-04-30 12:05:35 +0100 |
---|---|---|
committer | Chris Dent <cdent@anticdent.org> | 2023-04-30 12:05:35 +0100 |
commit | 81de36a1b598273018955baa855debf4a623befc (patch) | |
tree | 3ca06376f33ca2c93579c27316e1c3aec79e798f | |
parent | 02abe887d52254867fd4f287e7f361dd6c832100 (diff) | |
download | paste-git-81de36a1b598273018955baa855debf4a623befc.tar.gz |
quiet deprecations in in form.cgi
-rwxr-xr-x | tests/cgiapp_data/form.cgi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/cgiapp_data/form.cgi b/tests/cgiapp_data/form.cgi index ac513b1..5ad8f68 100755 --- a/tests/cgiapp_data/form.cgi +++ b/tests/cgiapp_data/form.cgi @@ -2,9 +2,16 @@ from __future__ import print_function -import cgi import sys +# Quiet warnings in this CGI so that it does not upset tests. +if not sys.warnoptions: + import warnings + warnings.simplefilter("ignore") + +# TODO: cgi is deprecated and will go away in Python 3.13. +import cgi + print('Content-type: text/plain') print('') |