Address ResourceWarning warnings
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
@@ -317,11 +317,11 @@ class VersionGetter:
|
||||
version = "(Unknown)"
|
||||
|
||||
try:
|
||||
p = asyncsub.Popen(self._args,
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, close_fds=True)
|
||||
p.wait()
|
||||
output = asyncsub.recv_some(p, e=0, stderr=1).decode()
|
||||
with asyncsub.Popen(self._args,
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, close_fds=True) as p:
|
||||
p.wait()
|
||||
output = asyncsub.recv_some(p, e=0, stderr=1).decode()
|
||||
vre = self._regexp.search(output)
|
||||
if vre:
|
||||
version = self._expander % vre.groupdict()
|
||||
|
||||
Reference in New Issue
Block a user