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.

We also drop initialize-urandom from our arm builds. We haven't used
this with x86 in some time and it was only really an issue for xenial
anyway. If x86 xenial doesn't need it then arm shouldn't either.

Change-Id: I3821336758b13051e9b331b8feb73fb1f8f1184a
This commit is contained in:
Clark Boylan 2024-09-12 10:33:57 -07:00
parent 8464f15157
commit 777ef2221c
3 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
#
@ -19,14 +19,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.error import URLError
URL = ('https://opendev.org/openstack/project-config/'
'raw/gerrit/projects.yaml')

View File

@ -106,7 +106,6 @@ diskimages:
- openstack-repos
- nodepool-base
- cache-devstack
- initialize-urandom
- growroot
- infra-package-needs
- journal-to-console