a guest Mar 13th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class ClientVerifier(type):
- '''отсутствие вызовов connect для сокетов'''
- def __new__(cls, clsname, bases, clsdict):
- for method in clsdict:
- if callable(clsdict.get(method)):
- for instr in dis.get_instructions(clsdict.get(method)):
- if instr.argval in INVALID_CALLS:
- raise ClientVerifierError
- return type.__new__(cls, clsname, bases, clsdict)
RAW Paste Data