Sfoglia il codice sorgente

add returncode to log

Hugo Quijada 6 anni fa
parent
commit
d7a5180478
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      ondemand/service.py

+ 1 - 0
ondemand/service.py

@@ -442,6 +442,7 @@ def cloud_download(ad_key=None):
             tp = (out_file, md5sum,)
             p = Popen(['ffprobe', '-v', 'error', '-select_streams', 'a:0', '-show_entries', 'stream=codec_name', '-of', 'default=nokey=1:noprint_wrappers=1', out_file], stdin=PIPE, stdout=PIPE, stderr=PIPE)
             rc = p.returncode
+            log.info("[process_segment] file {} returncode= {}", (out_file, rc,))
             if rc != 'mp3\n':
                 log.info('[process_segment] file {} is not mp3'.format(out_file))
                 subprocess.call(['mv', out_file, out_file + '.old'])