Skip to content

Commit

Permalink
Update ci_test to support python3
Browse files Browse the repository at this point in the history
  • Loading branch information
shahmishal committed Aug 21, 2024
1 parent f3d451e commit d571b97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ci_test.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ci_test - Build all Dockerfiles -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2019 Apple Inc. and the Swift project authors
# Copyright (c) 2024 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
Expand All @@ -13,7 +13,7 @@

from __future__ import absolute_import, print_function, unicode_literals

import urllib2
import urllib.request
import json
import subprocess
import sys
Expand All @@ -36,7 +36,7 @@ def run_command(cmd, log_file=None):
def get_dockerfiles():
dockerfiles = []
GITHUB_API_URL = "https://api.github.com"
response = urllib2.urlopen("{}/repos/{}/pulls/{}/files".format(GITHUB_API_URL,
response = urllib.request.urlopen("{}/repos/{}/pulls/{}/files".format(GITHUB_API_URL,
os.environ['ghprbGhRepository'],
os.environ['ghprbPullId']))
data = json.load(response)
Expand Down

0 comments on commit d571b97

Please sign in to comment.