Skip to content

Commit

Permalink
make client objects pickle-able
Browse files Browse the repository at this point in the history
  • Loading branch information
mnot committed Aug 24, 2010
1 parent 9c0bd61 commit e05a3ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/client.py
Expand Up @@ -125,6 +125,11 @@ def __init__(self, res_start_cb):
self._read_timeout_ev = None
self._output_buffer = []

def __getstate__(self):
props = ['method', 'uri', 'req_hdrs',
'input_header_length', 'input_transfer_length']
return dict([(k,v) for (k,v) in self.__dict__.items() if k in props])

def req_start(self, method, uri, req_hdrs, req_body_pause):
"""
Start a request to uri using method, where
Expand Down

0 comments on commit e05a3ac

Please sign in to comment.