From 6daf387c905b40927fbc1e7fdc754912f84b698d Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 26 Jun 2019 06:50:06 +1000 Subject: [PATCH] Missing parentheses and depreciated syntax (#2700) Fixes ``` File "get-platformio.py", line 93 print r['out'] ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(r['out'])? ``` and ``` File "get-platformio.py", line 146 except Exception, e: ^ SyntaxError: invalid syntax ``` --- scripts/get-platformio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/get-platformio.py b/scripts/get-platformio.py index 90ad5fea..ec201d62 100644 --- a/scripts/get-platformio.py +++ b/scripts/get-platformio.py @@ -90,7 +90,7 @@ def exec_python_cmd(args): def install_pip(): r = exec_python_cmd(["-m", "pip", "--version"]) if r['returncode'] == 0: - print r['out'] + print(r['out']) return try: from urllib2 import urlopen @@ -143,7 +143,7 @@ def main(): try: s[1]() print("[SUCCESS]") - except Exception, e: + except Exception as e: is_error = True print(str(e)) print("[FAILURE]")