mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
Mute consequent InsecureRequestWarning warnings
This commit is contained in:
parent
aec503585e
commit
77beee1d4a
@ -8,6 +8,7 @@ import ssl
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
import warnings
|
||||
|
||||
import http.client
|
||||
import http.cookiejar
|
||||
@ -25,6 +26,10 @@ from . import oscssl
|
||||
from .util.helper import decode_it
|
||||
|
||||
|
||||
# print only the first occurrence of matching warnings, regardless of location
|
||||
warnings.filterwarnings("once", category=urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
|
||||
class MockRequest:
|
||||
"""
|
||||
Mock a request object for `cookiejar.extract_cookies()`
|
||||
|
Loading…
Reference in New Issue
Block a user