From 2d4bc41cfc6dda31480893523da534058b200045 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Wed, 15 Sep 2021 09:48:49 +0200 Subject: [PATCH] Fix the assert as `.sort()` returns None Since `.sort()` returns None, we were checking that None == None which is not what we aimed to do. Quick reproducer: ``` >>> assert [1,2,3].sort() == [2,3,4].sort() >>> assert sorted([1,2,3]) == sorted([2,3,4]) Traceback (most recent call last): File "", line 1, in assert sorted([1,2,3]) == sorted([2,3,4]) AssertionError ``` Signed-off-by: Pierre-Yves Chibon --- tools/osbuild-mpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osbuild-mpp b/tools/osbuild-mpp index 2e37242f..89bb9984 100755 --- a/tools/osbuild-mpp +++ b/tools/osbuild-mpp @@ -748,7 +748,7 @@ class ManifestFileV1(ManifestFile): # We import `sources` from the manifest, as well as a pipeline description # from the `pipeline` entry. Make sure nothing else is in the manifest, so # we do not accidentally miss new features. - assert list(imp.root.keys()).sort() == ["pipeline", "sources"].sort() + assert sorted(imp.root) == sorted(["pipeline", "sources"]) # Now with everything imported and verified, we can merge the pipeline back # into the original manifest. We take all URLs and merge them in the pinned