Advertisement
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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement