aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-07-25 13:43:41 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-07-31 08:58:34 +0000
commit6ef3f7b0f3923e12a5009957ae99ac5018159d19 (patch)
tree4025abdc633ffd7932ebfff43c9874e793f2df21 /examples
parent57b21a267a4a0eda83d278ac885798b1a963cb78 (diff)
Fix fortuneserver string return type
We don't need a special treatment after the QByteArray and Python string patch. The issue is not fully fixed, but the missing part is reported under PYSIDE-341 Task-number: PYSIDE-705 Change-Id: I4a043eff188deb28cb1fa5c5eb653ace75ce073e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/network/fortuneserver.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/examples/network/fortuneserver.py b/examples/network/fortuneserver.py
index 852aabaf..692c5bd3 100755
--- a/examples/network/fortuneserver.py
+++ b/examples/network/fortuneserver.py
@@ -97,13 +97,6 @@ class Server(QtWidgets.QDialog):
out.writeUInt16(0)
fortune = self.fortunes[random.randint(0, len(self.fortunes) - 1)]
- try:
- # Python v3.
- fortune = bytes(fortune, encoding='ascii')
- except:
- # Python v2.
- pass
-
out.writeString(fortune)
out.device().seek(0)
out.writeUInt16(block.size() - 2)