HomePhabricator

procutil: avoid an uninitialized variable usage on tempfile exception

Authored by mharbison72.

Description

procutil: avoid an uninitialized variable usage on tempfile exception

If pycompat.unnamedtempfile() raises an exception, it would have called
stdin.close() in the finally block without it being initialized first.

Differential Revision: https://phab.mercurial-scm.org/D11928

Details

Committed
mharbison72Dec 14 2021, 5:29 PM
Differential Revision
D11928: procutil: avoid an uninitialized variable usage on tempfile exception
Parents
rHG333a2656e981: pytype: stop excluding procutil.py
Branches
Unknown
Tags
Unknown