aboutsummaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2020-10-27 20:12:12 +0100
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2020-10-28 13:56:40 +0000
commit1fceed1fc3565080eef556c9b71498780aa94bf2 (patch)
tree848628ec5561e8c90d19cf3996f1047d39ab7928 /examples/network
parent1bc8c8ce262d80bbea0141f48055342adca9e3f9 (diff)
examples: Remove Python 2.7 and <3.6 related code
* removing from __future__ import ... * updating CMakeLists.txt files * removing special if-else for Python 2 and 3 Change-Id: I8a34b06b6b384ebc5323f20f7c15c357a5be6d62 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/fortuneclient.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/examples/network/fortuneclient.py b/examples/network/fortuneclient.py
index 00247eee0..ee4bc5670 100644
--- a/examples/network/fortuneclient.py
+++ b/examples/network/fortuneclient.py
@@ -118,13 +118,7 @@ class Client(QtWidgets.QDialog):
return
nextFortune = instr.readString()
-
- try:
- # Python v3.
- nextFortune = str(nextFortune, encoding='ascii')
- except TypeError:
- # Python v2.
- pass
+ nextFortune = str(nextFortune, encoding='ascii')
if nextFortune == self.currentFortune:
QtCore.QTimer.singleShot(0, self.requestNewFortune)