From 7ae5ef71f800ef03a1d591c7acc2f71eaa481e9c Mon Sep 17 00:00:00 2001 From: Chris Mumford Date: Fri, 28 Apr 2023 07:08:36 -0700 Subject: [PATCH] Update fetch-sk and fetch-gn to Python 3 Bug: skia:14289 Change-Id: I951979327c2ffbb38f06b0d5539a0536a9569a90 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/685936 Reviewed-by: John Stiles --- bin/fetch-gn | 7 ++----- bin/fetch-sk | 8 +++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/bin/fetch-gn b/bin/fetch-gn index 4602c4ce69a8..4a9f6bceff19 100755 --- a/bin/fetch-gn +++ b/bin/fetch-gn @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2016 Google Inc. # @@ -13,10 +13,7 @@ import sys import tempfile import zipfile -if sys.version_info[0] < 3: - from urllib2 import urlopen -else: - from urllib.request import urlopen +from urllib.request import urlopen os.chdir(os.path.join(os.path.dirname(__file__), os.pardir)) diff --git a/bin/fetch-sk b/bin/fetch-sk index 1b978eede9c5..b535c570ac21 100755 --- a/bin/fetch-sk +++ b/bin/fetch-sk @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2021 Google Inc. # @@ -15,10 +15,8 @@ import sys import tempfile import zipfile -if sys.version_info[0] < 3: - from urllib2 import urlopen -else: - from urllib.request import urlopen +from urllib.request import urlopen + def sha256sum(path): try: