Remove python 2 dependency
Removing python 2 dependency from docker-image-collector.sh
Issue-ID: OOM-2359
Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
Change-Id: I6aa4d27cdb10e93981e3dacfb16b2d02a0bf0762
diff --git a/build/creating_data/docker-images-collector.sh b/build/creating_data/docker-images-collector.sh
index c07de10..76ee901 100755
--- a/build/creating_data/docker-images-collector.sh
+++ b/build/creating_data/docker-images-collector.sh
@@ -40,15 +40,13 @@
}
parse_yaml() {
-python - <<PYP
-#!/usr/bin/python
-from __future__ import print_function
+python3 - <<PYP
+#!/usr/bin/python3
import yaml
import sys
with open("${1}", 'r') as f:
values = yaml.load(f, Loader=yaml.SafeLoader)
-
enabled = filter(lambda x: values[x].get('enabled', False) == True, values)
print(' '.join(enabled))
PYP