From c8be3fa09a1c0761401097d0f984252bf5018e6e Mon Sep 17 00:00:00 2001 From: bugchecker Date: Thu, 3 Oct 2019 22:41:40 +0000 Subject: [PATCH] Fixing "unclosed files" warning in tests --- pyscreeze/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyscreeze/__init__.py b/pyscreeze/__init__.py index 90391ea..9792184 100644 --- a/pyscreeze/__init__.py +++ b/pyscreeze/__init__.py @@ -57,6 +57,7 @@ whichProc = subprocess.Popen( ['which', 'scrot'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) scrotExists = whichProc.wait() == 0 + whichProc.communicate() except OSError as ex: if ex.errno == errno.ENOENT: # if there is no "which" program to find scrot, then assume there