aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/copyright_header.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/devtools/copyright_header.py')
-rwxr-xr-xcontrib/devtools/copyright_header.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py
index 38f3df77c9..680de1f1b3 100755
--- a/contrib/devtools/copyright_header.py
+++ b/contrib/devtools/copyright_header.py
@@ -35,7 +35,6 @@ EXCLUDE_DIRS = [
"src/leveldb/",
"src/minisketch",
"src/secp256k1/",
- "src/univalue/",
"src/crc32c/",
]
@@ -320,15 +319,13 @@ def get_most_recent_git_change_year(filename):
################################################################################
def read_file_lines(filename):
- f = open(filename, 'r', encoding="utf8")
- file_lines = f.readlines()
- f.close()
+ with open(filename, 'r', encoding="utf8") as f:
+ file_lines = f.readlines()
return file_lines
def write_file_lines(filename, file_lines):
- f = open(filename, 'w', encoding="utf8")
- f.write(''.join(file_lines))
- f.close()
+ with open(filename, 'w', encoding="utf8") as f:
+ f.write(''.join(file_lines))
################################################################################
# update header years execution