Close file descriptors in airtime_analyzer before forking subprocesses
This commit is contained in:
parent
dbfb2fc69b
commit
70a2190494
3 changed files with 5 additions and 5 deletions
|
@ -19,7 +19,7 @@ class ReplayGainAnalyzer(Analyzer):
|
|||
'''
|
||||
command = [ReplayGainAnalyzer.REPLAYGAIN_EXECUTABLE, '-d', filename]
|
||||
try:
|
||||
results = subprocess.check_output(command, stderr=subprocess.STDOUT)
|
||||
results = subprocess.check_output(command, stderr=subprocess.STDOUT, close_fds=True)
|
||||
filename_token = "%s: " % filename
|
||||
rg_pos = results.find(filename_token, results.find("Calculating Replay Gain information")) + len(filename_token)
|
||||
db_pos = results.find(" dB", rg_pos)
|
||||
|
@ -33,4 +33,4 @@ class ReplayGainAnalyzer(Analyzer):
|
|||
except Exception as e:
|
||||
logging.warn(e)
|
||||
|
||||
return metadata
|
||||
return metadata
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue