commit acb0b03e325819fd4aaae1d82c8dd7d148f51041 Author: Dave Rolek dmr-x@riseup.net Date: Sun Jun 10 22:56:47 2018 +0000
Replace RelayCommand strings with use of the enum --- stem/descriptor/remote.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py index 158a010d..94220a9c 100644 --- a/stem/descriptor/remote.py +++ b/stem/descriptor/remote.py @@ -100,6 +100,7 @@ import zlib
import stem import stem.client +from stem.client.datatype import RelayCommand import stem.descriptor import stem.directory import stem.prereq @@ -849,8 +850,8 @@ def _download_from_orport(endpoint, compression, resource): 'User-Agent: %s' % stem.USER_AGENT, )) + '\r\n\r\n'
- circ.send('RELAY_BEGIN_DIR', stream_id = 1) - response = b''.join([cell.data for cell in circ.send('RELAY_DATA', request, stream_id = 1)]) + circ.send(RelayCommand.BEGIN_DIR, stream_id = 1) + response = b''.join([cell.data for cell in circ.send(RelayCommand.DATA, request, stream_id = 1)]) first_line, data = response.split(b'\r\n', 1) header_data, data = data.split(b'\r\n\r\n', 1)