|
From: Mercurial C. <th...@in...> - 2026-05-12 21:11:58
|
# HG changeset patch
# User John Rouillard <ro...@ie...>
# Date 1778516201 14400
# Mon May 11 12:16:41 2026 -0400
# Node ID 75bd16f814a465b45a2e031e456666f652891a41
# Parent ef5c2df157a8395cad8c332f1901d169d99e6ea4
bug: fix ResourceWarning unclosed file
diff -r ef5c2df157a8 -r 75bd16f814a4 roundup/install_util.py
--- a/roundup/install_util.py Mon May 11 10:51:40 2026 -0400
+++ b/roundup/install_util.py Mon May 11 12:16:41 2026 -0400
@@ -154,7 +154,8 @@
if file is None:
file = sys.argv[0]
- testdata = open(file, 'rb').read()
+ with open(file, 'rb') as f:
+ testdata = f.read()
for ext in digested_file_types:
testfile = "__digest_test" + ext
|