aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <derodat@adacore.com>2020-05-26 16:13:28 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-05-26 17:45:38 +0200
commitbb07057a316f7f8c3daa1a4dd67fd3c5d9d450c7 (patch)
treef29fde9a9240e9ac011053ac7ed31358638754df /contrib/gcc-changelog/git_commit.py
parent0981cf960d07752f9844a2f2799fbc85a7f1efd8 (diff)
downloadgcc-bb07057a316f7f8c3daa1a4dd67fd3c5d9d450c7.zip
gcc-bb07057a316f7f8c3daa1a4dd67fd3c5d9d450c7.tar.gz
gcc-bb07057a316f7f8c3daa1a4dd67fd3c5d9d450c7.tar.bz2
gcc-changelog: remove file descriptor leaks
Currently, running gcc-changelog's unit tests may clutter the output with tons of warnings such as: .../contrib/gcc-changelog/git_email.py:40: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tmpt5okd4qp.patch' mode='r' encoding='UTF-8'> lines = open(self.filename).read().splitlines() ResourceWarning: Enable tracemalloc to get the object allocation traceback This commit fixes these leaks, which restores a clean testsuite output. contrib/ * gcc-changelog/git_update_version.py: Close file objects after use. * gcc-changelog/git_email.py: Likewise. * gcc-changelog/test_email.py: Likewise.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions