whois/parser.py
changeset 111 ccad96890edd
parent 110 1e59f3be6a11
child 112 8acab8765146
child 113 bb2f29951cbb
equal deleted inserted replaced
110:1e59f3be6a11 111:ccad96890edd
   155 
   155 
   156     def __str__(self):
   156     def __str__(self):
   157         handler = lambda e: str(e)
   157         handler = lambda e: str(e)
   158         return json.dumps(self, indent=2, default=handler)
   158         return json.dumps(self, indent=2, default=handler)
   159 
   159 
       
   160     def __getstate__(self):
       
   161         return self.__dict__
       
   162 
       
   163     def __setstate__(self, state):
       
   164         self.__dict__ = state
   160 
   165 
   161     @staticmethod
   166     @staticmethod
   162     def load(domain, text):
   167     def load(domain, text):
   163         """Given whois output in ``text``, return an instance of ``WhoisEntry``
   168         """Given whois output in ``text``, return an instance of ``WhoisEntry``
   164         that represents its parsed contents.
   169         that represents its parsed contents.