diff --git a/nodepool/elements/openstack-repos/extra-data.d/50-create-repo-list b/nodepool/elements/openstack-repos/extra-data.d/50-create-repo-list index 7de9d7bedb..8423a6012e 100755 --- a/nodepool/elements/openstack-repos/extra-data.d/50-create-repo-list +++ b/nodepool/elements/openstack-repos/extra-data.d/50-create-repo-list @@ -19,8 +19,14 @@ import os import yaml -from six.moves.urllib.request import urlopen -from six.moves.urllib.error import URLError +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 URL = ('https://opendev.org/openstack/project-config/' 'raw/gerrit/projects.yaml')