Rename "morituri" module to "whipper".
Fixes https://github.com/JoeLametta/whipper/issues/100
This commit is contained in:
18
whipper/program/flac.py
Normal file
18
whipper/program/flac.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from subprocess import check_call, CalledProcessError
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def encode(infile, outfile):
|
||||
"""
|
||||
Encodes infile to outfile, with flac.
|
||||
Uses '-f' because morituri already creates the file.
|
||||
"""
|
||||
try:
|
||||
# TODO: Replace with Popen so that we can catch stderr and write it to
|
||||
# logging
|
||||
check_call(['flac', '--silent', '--verify', '-o', outfile,
|
||||
'-f', infile])
|
||||
except CalledProcessError:
|
||||
logger.exception('flac failed')
|
||||
raise
|
||||
Reference in New Issue
Block a user