Advertisement
Guest User

Untitled

a guest
Mar 13th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. class ClientVerifier(type):
  2.     '''отсутствие вызовов connect для сокетов'''
  3.  
  4.     def __new__(cls, clsname, bases, clsdict):
  5.         for method in clsdict:
  6.             if callable(clsdict.get(method)):
  7.                 for instr in dis.get_instructions(clsdict.get(method)):
  8.                     if instr.argval in INVALID_CALLS:
  9.                         raise ClientVerifierError
  10.         return type.__new__(cls, clsname, bases, clsdict)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement