Convert python2 dib element scripts to python3

As part of the move to zuul jobs building images we've discovered we
have a couple of scripts that are invoked by python2. Python2 isn't
available be default in the test images and python2 is old enough now
that we should just use python3. This change updates things to make it
so.

Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Change-Id: Ib8692ef1389f80b4af59784d5b89d6dadc349a7c
This commit is contained in:
James E. Blair 2024-09-12 10:55:54 -07:00
parent 7521476a99
commit 0f30e60e96
2 changed files with 4 additions and 11 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 Red Hat, Inc.
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (C) 2011-2013 OpenStack Foundation
#
@ -18,15 +18,8 @@
import os
import yaml
try:
from six.moves.urllib.request import urlopen
except ImportError:
from urllib.request import urlopen
try:
from six.moves.urllib.error import URLError
except ImportError:
from urllib.request import URLError
from urllib.request import urlopen
from urllib.request import URLError
URL = ('https://opendev.org/openstack/project-config/'
'raw/gerrit/projects.yaml')