From f5ec9b3f97df65e75f879b76e0d3a70dd0cf9361 Mon Sep 17 00:00:00 2001 From: asamoukin Date: Thu, 20 Aug 2009 10:00:50 +0000 Subject: [PATCH] git-svn-id: http://svn.calculate.ru/calculate2/calculate-lib/trunk@2512 c91db197-33c1-4113-bf15-f8a5c547ca64 --- pym/cl_profile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/cl_profile.py b/pym/cl_profile.py index 8d999c6..b948902 100644 --- a/pym/cl_profile.py +++ b/pym/cl_profile.py @@ -1855,9 +1855,9 @@ class _file(_error): if profile=="Old" and self.nameFileOld: nameFile = self.nameFileOld sp = subprocess.Popen("file '%s'"%nameFile, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, close_fds=True, - shell=True) - fout, fin = (sp.stdout, sp.stdin) + stdout=subprocess.PIPE, stderr=subprocess.PIPE, + close_fds=True, shell=True) + fout, fin, ferr = (sp.stdout, sp.stdin, sp.stderr) fin.close() textLine = fout.readline() fout.readlines() @@ -1873,6 +1873,7 @@ class _file(_error): if textFormat in fileTypeString: retText = "text" break + ferr.close() return retText def scanDirs(self, profilesDirs):