diff options
author | Tomasz Moń <desowin@gmail.com> | 2019-04-15 18:27:10 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-04-15 21:11:30 +0000 |
commit | d2a2698fd87d49c44b5a081369c718e451e46c90 (patch) | |
tree | 8fe118a76e95a4f110626b0a470a391ac34fc6cd /doc | |
parent | 7aa48b30995ed0b145cd8df8ff69df8b2bb1fe0e (diff) |
extcap: Fix Python 3 bytes handling in example
In Python 3 strings cannot be joined with bytes.
This change has no effect for Python 2.
Ping-Bug: 15694
Change-Id: I2eb62698ce323f8156ed98b7fe88e4e43e59c784
Reviewed-on: https://code.wireshark.org/review/32843
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/extcap_example.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/doc/extcap_example.py b/doc/extcap_example.py index 2080e48af9..22c6d92ff6 100755 --- a/doc/extcap_example.py +++ b/doc/extcap_example.py @@ -337,8 +337,7 @@ def control_write_defaults(fn_out): control_write(fn_out, CTRL_ARG_VERIFY, CTRL_CMD_SET, struct.pack('B', verify)) for i in range(1,16): - item = bytearray() - item += str(i) + struct.pack('B', 0) + str(i) + " sec" + item = '%d\x00%d sec' % (i, i) control_write(fn_out, CTRL_ARG_DELAY, CTRL_CMD_ADD, item) control_write(fn_out, CTRL_ARG_DELAY, CTRL_CMD_REMOVE, str(60)) |