To avoid warnings about unclosed files.
Signed-off-by: Ross Burton <[email protected]>
---
scripts/contrib/patchreview.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py
index d8d7b214e5c..dcf20937a8f 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -253,7 +253,8 @@ if __name__ == "__main__":
if args.json:
if os.path.isfile(args.json):
- data = json.load(open(args.json))
+ with open(args.json) as f:
+ data = json.load(f)
else:
data = []
--
2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#227562):
https://lists.openembedded.org/g/openembedded-core/message/227562
Mute This Topic: https://lists.openembedded.org/mt/116733244/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-