Revision 9fa2e150
b/lib/http/client.py | ||
---|---|---|
95 | 95 |
self.resp_headers = None |
96 | 96 |
self.resp_body = None |
97 | 97 |
|
98 |
def __repr__(self): |
|
99 |
status = ["%s.%s" % (self.__class__.__module__, self.__class__.__name__), |
|
100 |
"%s:%s" % (self.host, self.port), |
|
101 |
self.method, |
|
102 |
self.path] |
|
103 |
|
|
104 |
return "<%s at %#x>" % (" ".join(status), id(self)) |
|
105 |
|
|
98 | 106 |
|
99 | 107 |
class _HttpClientToServerMessageWriter(http.HttpMessageWriter): |
100 | 108 |
pass |
... | ... | |
328 | 336 |
# Thread synchronization |
329 | 337 |
self.done = threading.Event() |
330 | 338 |
|
339 |
def __repr__(self): |
|
340 |
status = ["%s.%s" % (self.__class__.__module__, self.__class__.__name__), |
|
341 |
"req=%r" % self.request] |
|
342 |
|
|
343 |
return "<%s at %#x>" % (" ".join(status), id(self)) |
|
344 |
|
|
331 | 345 |
|
332 | 346 |
class HttpClientWorker(workerpool.BaseWorker): |
333 | 347 |
"""HTTP client worker class. |
b/lib/jqueue.py | ||
---|---|---|
190 | 190 |
# Condition to wait for changes |
191 | 191 |
self.change = threading.Condition(self.queue._lock) |
192 | 192 |
|
193 |
def __repr__(self): |
|
194 |
status = ["%s.%s" % (self.__class__.__module__, self.__class__.__name__), |
|
195 |
"id=%s" % self.id, |
|
196 |
"ops=%s" % ",".join([op.input.Summary() for op in self.ops])] |
|
197 |
|
|
198 |
return "<%s at %#x>" % (" ".join(status), id(self)) |
|
199 |
|
|
193 | 200 |
@classmethod |
194 | 201 |
def Restore(cls, queue, state): |
195 | 202 |
"""Restore a _QueuedJob from serialized state: |
Also available in: Unified diff