diff --git a/.python-version b/.python-version
index 7c69a55d..2e14a955 100644
--- a/.python-version
+++ b/.python-version
@@ -1 +1 @@
-3.7.0
+3.8.6
diff --git a/olm/versioning/collect_csvs.py b/olm/versioning/collect_csvs.py
index f86e2256..d526c44a 100755
--- a/olm/versioning/collect_csvs.py
+++ b/olm/versioning/collect_csvs.py
@@ -28,17 +28,23 @@
tar = tarfile.open(fileobj=io.BytesIO(response.content), mode='r')
- bundle_member = [member for member in tar.getmembers() if 'bundle.yaml' in member.name][0]
+ possible_bundle_members = [member for member in tar.getmembers() if 'bundle.yaml' in member.name]
- bundle = tar.extractfile(bundle_member)
+ if (len(possible_bundle_members) > 0):
+ bundle_member = possible_bundle_members[0]
- data = yaml.load(bundle, Loader=yaml.SafeLoader)
+ bundle = tar.extractfile(bundle_member)
- csv_bundles = yaml.load_all(data['data']['clusterServiceVersions'], Loader=yaml.SafeLoader)
+ data = yaml.load(bundle, Loader=yaml.SafeLoader)
+
+ csv_bundles = yaml.load_all(data['data']['clusterServiceVersions'], Loader=yaml.SafeLoader)
+ else:
+ csv_bundles = [yaml.load(tar.extractfile(member),Loader=yaml.SafeLoader) for member in tar.getmembers() if 'clusterserviceversion.yaml' in member.name]
for csv_bundle in csv_bundles:
for csv in csv_bundle:
- csvs_by_version[csv['spec']['version']] = csv
+ if isinstance(csv, dict):
+ csvs_by_version[csv['spec']['version']] = csv
ordered_csvs = sorted(csvs_by_version.values(), key=lambda csv: semver.VersionInfo.parse(csv['spec']['version']))
diff --git a/pom.xml b/pom.xml
index 2e92f249..6c0a270f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,6 +13,7 @@
UTF-8
2.22.0
1.2.1.Final
+ 1.62
1.8
UTF-8
1.8
@@ -38,6 +39,12 @@
io.quarkus
quarkus-kubernetes-client
+
+
+ org.bouncycastle
+ bcpkix-jdk15on
+ ${bouncycastle.version}
+
io.quarkus
quarkus-smallrye-reactive-streams-operators