diff --git a/packager/app/test/packager_app.py b/packager/app/test/packager_app.py index 74bef7d217..834f736125 100644 --- a/packager/app/test/packager_app.py +++ b/packager/app/test/packager_app.py @@ -1,5 +1,3 @@ -#!/usr/bin/python -# # Copyright 2014 Google Inc. All Rights Reserved. # # Use of this source code is governed by a BSD-style diff --git a/packager/app/test/test_env.py b/packager/app/test/test_env.py index 8f3de3b3ca..951e9de586 100644 --- a/packager/app/test/test_env.py +++ b/packager/app/test/test_env.py @@ -1,5 +1,3 @@ -#!/usr/bin/python -# # Copyright 2014 Google Inc. All Rights Reserved. # # Use of this source code is governed by a BSD-style diff --git a/packager/version/generate_version_string.py b/packager/version/generate_version_string.py index ae263873e7..460c6b4ba7 100755 --- a/packager/version/generate_version_string.py +++ b/packager/version/generate_version_string.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Copyright 2015 Google Inc. All rights reserved. # @@ -12,7 +12,7 @@ import subprocess if __name__ == '__main__': try: version_tag = subprocess.check_output('git tag --points-at HEAD', - stderr=subprocess.STDOUT, shell=True).rstrip() + stderr=subprocess.STDOUT, shell=True).decode().rstrip() except subprocess.CalledProcessError as e: # git tag --points-at is not supported in old versions of git. Just ignore # version_tag in this case. @@ -20,11 +20,11 @@ if __name__ == '__main__': try: version_hash = subprocess.check_output('git rev-parse --short HEAD', - stderr=subprocess.STDOUT, shell=True).rstrip() + stderr=subprocess.STDOUT, shell=True).decode().rstrip() except subprocess.CalledProcessError as e: version_hash = 'unknown-version' if version_tag: print('{0}-{1}'.format(version_tag, version_hash)) else: - print(version_hash.decode('utf8')) + print(version_hash)