Skip to content

Commit a547ca6

Browse files
authored
Adding missing load_verify_locations method. (#107)
1 parent 4a12c70 commit a547ca6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

mocket/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
__all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer")
99

10-
__version__ = "3.8.3"
10+
__version__ = "3.8.4"

mocket/mocket.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def __init__(self, sock=None, server_hostname=None, _context=None, *args, **kwar
9494
def load_default_certs(*args, **kwargs):
9595
pass
9696

97+
@staticmethod
98+
def load_verify_locations(*args, **kwargs):
99+
pass
100+
97101
@staticmethod
98102
def wrap_socket(sock=sock, *args, **kwargs):
99103
sock.kwargs = kwargs
@@ -106,7 +110,8 @@ def wrap_bio(self, incoming, outcoming, *args, **kwargs):
106110
return ssl_obj
107111

108112
def __getattr__(self, name):
109-
return getattr(self.sock, name)
113+
if self.sock is not None:
114+
return getattr(self.sock, name)
110115

111116

112117
def create_connection(

0 commit comments

Comments
 (0)