summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-05 15:48:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-03 23:45:54 +0100
commite616beba1c85e31246d1c798191b194d168b3489 (patch)
tree5b9d19e7c4a7caeb72f1bb9da4a2b221cfb1da96 /scripts/contrib
parentf2854c67ce963211f27223bd1194420621694bc2 (diff)
downloadpoky-e616beba1c85e31246d1c798191b194d168b3489.tar.gz
scripts: ensure tinfoil is shut down correctly
We should always shut down tinfoil when we're finished with it, either by explicitly calling the shutdown() method or by using it as a context manager ("with ..."). (From OE-Core rev: 5ec6d9ef309b841cdcbf1d14ac678d106d5d888a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/list-packageconfig-flags.py28
-rwxr-xr-xscripts/contrib/verify-homepage.py12
2 files changed, 20 insertions, 20 deletions
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py
index 9090935e0f..389fb97f67 100755
--- a/scripts/contrib/list-packageconfig-flags.py
+++ b/scripts/contrib/list-packageconfig-flags.py
@@ -159,20 +159,20 @@ def main():
159 159
160 options, args = parser.parse_args(sys.argv) 160 options, args = parser.parse_args(sys.argv)
161 161
162 bbhandler = bb.tinfoil.Tinfoil() 162 with bb.tinfoil.Tinfoil() as bbhandler:
163 bbhandler.prepare() 163 bbhandler.prepare()
164 print("Gathering recipe data...") 164 print("Gathering recipe data...")
165 data_dict = get_recipesdata(bbhandler, options.preferred) 165 data_dict = get_recipesdata(bbhandler, options.preferred)
166 166
167 if options.listtype == 'flags': 167 if options.listtype == 'flags':
168 pkg_dict = collect_pkgs(data_dict) 168 pkg_dict = collect_pkgs(data_dict)
169 flag_dict = collect_flags(pkg_dict) 169 flag_dict = collect_flags(pkg_dict)
170 display_flags(flag_dict) 170 display_flags(flag_dict)
171 elif options.listtype == 'recipes': 171 elif options.listtype == 'recipes':
172 pkg_dict = collect_pkgs(data_dict) 172 pkg_dict = collect_pkgs(data_dict)
173 display_pkgs(pkg_dict) 173 display_pkgs(pkg_dict)
174 elif options.listtype == 'all': 174 elif options.listtype == 'all':
175 display_all(data_dict) 175 display_all(data_dict)
176 176
177if __name__ == "__main__": 177if __name__ == "__main__":
178 main() 178 main()
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py
index 0b1450a018..d39dd1d973 100755
--- a/scripts/contrib/verify-homepage.py
+++ b/scripts/contrib/verify-homepage.py
@@ -54,9 +54,9 @@ def verifyHomepage(bbhandler):
54 return count 54 return count
55 55
56if __name__=='__main__': 56if __name__=='__main__':
57 bbhandler = bb.tinfoil.Tinfoil() 57 with bb.tinfoil.Tinfoil() as bbhandler:
58 bbhandler.prepare() 58 bbhandler.prepare()
59 logger.info("Start verifying HOMEPAGE:") 59 logger.info("Start verifying HOMEPAGE:")
60 failcount = verifyHomepage(bbhandler) 60 failcount = verifyHomepage(bbhandler)
61 logger.info("Finished verifying HOMEPAGE.") 61 logger.info("Finished verifying HOMEPAGE.")
62 logger.info("Summary: %s failed" % failcount) 62 logger.info("Summary: %s failed" % failcount)