From 342bebc7330d532d499b54726798845f2e36f850 Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 7 Jan 2019 08:58:43 +0100 Subject: [PATCH 1/3] Define raw_input() in Python 3 __raw_input()__ was removed in Python 3 in favor of a reworked version of __input()__. This change ensures equivalent functionality in both Python 2 and Python 3. --- inter/GetRandCode.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inter/GetRandCode.py b/inter/GetRandCode.py index 8d496e4..e95f8c8 100644 --- a/inter/GetRandCode.py +++ b/inter/GetRandCode.py @@ -4,6 +4,11 @@ from PIL import Image from config.ticketConf import _get_yaml from damatuCode.ruokuai import RClient +try: + raw_input # Python 2 +excpet NameError: # Python 3 + raw_input = input + def getRandCode(is_auto_code, auto_code_type, result): """ From 3ca6f13d06344d36c6f6aebcaf65ca4c87af15a7 Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 7 Jan 2019 09:34:44 +0100 Subject: [PATCH 2/3] Fix typo --- inter/GetRandCode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inter/GetRandCode.py b/inter/GetRandCode.py index e95f8c8..140caa4 100644 --- a/inter/GetRandCode.py +++ b/inter/GetRandCode.py @@ -6,7 +6,7 @@ from damatuCode.ruokuai import RClient try: raw_input # Python 2 -excpet NameError: # Python 3 +except NameError: # Python 3 raw_input = input From 4c1ab61b7b43c19a6c995cecc4c41b379328a124 Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 7 Jan 2019 09:45:38 +0100 Subject: [PATCH 3/3] Trailing whitespace --- inter/GetRandCode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inter/GetRandCode.py b/inter/GetRandCode.py index 140caa4..01feb68 100644 --- a/inter/GetRandCode.py +++ b/inter/GetRandCode.py @@ -7,7 +7,7 @@ from damatuCode.ruokuai import RClient try: raw_input # Python 2 except NameError: # Python 3 - raw_input = input + raw_input = input def getRandCode(is_auto_code, auto_code_type, result):