From c2eee6f743d848c6d926a53c7475cfbe4df9fbad Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 26 May 2022 18:24:59 +0200 Subject: [PATCH] Use print() function in both Python 2 and Python 3 (#12467) The current code is a syntax error in Python 3. The proposed code works as expected in both Python 2 and Python 3. --- samples/client/petstore/javascript-closure-angular/compile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/javascript-closure-angular/compile.py b/samples/client/petstore/javascript-closure-angular/compile.py index 2797a6f3456..d952f2f2157 100755 --- a/samples/client/petstore/javascript-closure-angular/compile.py +++ b/samples/client/petstore/javascript-closure-angular/compile.py @@ -53,8 +53,8 @@ def main(): for name, targetFiles in targets.iteritems(): errors = checkForCompilerErrors(targetFiles) if errors: - print "Compiler errors when building %s" % name - print errors + print("Compiler errors when building %s" % name) + print(errors) for name, targetFiles in targets.iteritems(): compile("%s.compiled.js" % name, targets[name])