summaryrefslogtreecommitdiff
path: root/py/demo/Ice/throughput/Client.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-09-17 11:22:22 +0200
committerBenoit Foucher <benoit@zeroc.com>2013-09-17 11:22:22 +0200
commit0ec6ca2358bbceae6e3bc740e86470df8ffed5c7 (patch)
tree81b8b93edc233cf1863ad84464596d4aa03bfad1 /py/demo/Ice/throughput/Client.py
parentrevert unintended chante to testicedist.py (diff)
downloadice-0ec6ca2358bbceae6e3bc740e86470df8ffed5c7.tar.bz2
ice-0ec6ca2358bbceae6e3bc740e86470df8ffed5c7.tar.xz
ice-0ec6ca2358bbceae6e3bc740e86470df8ffed5c7.zip
Better fix for ICE-5426 - use bytearray() instead of xrange/range to create byte array
Diffstat (limited to 'py/demo/Ice/throughput/Client.py')
-rwxr-xr-xpy/demo/Ice/throughput/Client.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/py/demo/Ice/throughput/Client.py b/py/demo/Ice/throughput/Client.py
index 48bf1b683f0..5da6fd8d27e 100755
--- a/py/demo/Ice/throughput/Client.py
+++ b/py/demo/Ice/throughput/Client.py
@@ -47,13 +47,7 @@ class Client(Ice.Application):
return 1
throughputOneway = Demo.ThroughputPrx.uncheckedCast(throughput.ice_oneway())
- if sys.version_info[0] == 2:
- b = []
- b[0:Demo.ByteSeqSize] = range(0, Demo.ByteSeqSize)
- b = ['\x00' for x in b]
- byteSeq = ''.join(b)
- else:
- byteSeq = bytes([0 for x in range(0, Demo.ByteSeqSize)])
+ byteSeq = bytearray(Demo.ByteSeqSize)
stringSeq = []
stringSeq[0:Demo.StringSeqSize] = range(0, Demo.StringSeqSize)