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):