From e23d86ca4dbc0e481ddb183149dfcdd1dd6ddc0c Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 1 Feb 2022 11:19:22 -0500
Subject: [PATCH] SL-13792: Cannot mix print statement and print function.

'from __future__ import print_function' not only makes the print() function
available, it also makes the Python 2 print statement invalid syntax. Until we
merge with the Python 3 branch (soon!), don't import print_function: instead
revert to 'print >> sys.stderr' statements.
---
 indra/newview/viewer_manifest.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 55f168d9a3c..a7a6a01d28d 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -26,8 +26,6 @@
 Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 $/LicenseInfo$
 """
-from __future__ import print_function
-
 import errno
 import glob
 import itertools
@@ -1317,9 +1315,9 @@ def package_finish(self):
                         ]
                     for attempt in range(3):
                         if attempt: # second or subsequent iteration
-                            print("codesign failed, waiting %d seconds before retrying" %
-                                  sign_retry_wait,
-                                  file=sys.stderr)
+                            print >> sys.stderr, \
+                                ("codesign failed, waiting %d seconds before retrying" %
+                                 sign_retry_wait)
                             time.sleep(sign_retry_wait)
                             sign_retry_wait*=2
 
@@ -1349,7 +1347,7 @@ def package_finish(self):
                             # 'err' goes out of scope
                             sign_failed = err
                     else:
-                        print("Maximum codesign attempts exceeded; giving up", file=sys.stderr)
+                        print >> sys.stderr, "Maximum codesign attempts exceeded; giving up"
                         raise sign_failed
                     self.run_command(['spctl', '-a', '-texec', '-vvvv', app_in_dmg])
                     self.run_command([self.src_path_of("installers/darwin/apple-notarize.sh"), app_in_dmg])
-- 
GitLab