]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix digdelv test
authorMatthijs Mekking <matthijs@isc.org>
Thu, 16 Apr 2020 06:56:02 +0000 (08:56 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 16 Apr 2020 09:50:33 +0000 (11:50 +0200)
The yamlget.py file was changed in !3311 as part of making the
python code pylint and flake8 compliant.  This omitted setting
'item' to 'item[key]' which caused the digdelv yaml tests to fail.

Also, the pretty printing is not really necessary, so remove
the "if key not in item; print error" logic.

bin/tests/system/digdelv/yamlget.py

index 24f457b7b1608d2166e7c0a366ee593852bdb7f8..5e35c5658aa9cd21a2ef537be18bba5267d8f042 100644 (file)
@@ -24,7 +24,7 @@ with open(sys.argv[1], "r") as f:
                 key = int(key)
             except ValueError:
                 pass
-            if key not in item:
-                print('error: index not found')
-                sys.exit(1)
+
+            item = item[key]
+
         print(item)