fixing 5.29 -> 5.30 python-magic

This commit is contained in:
brent s. 2018-06-02 13:01:17 -04:00
parent a137dc395c
commit a613cbe220

View File

@ -158,7 +158,8 @@ def confArgs(conf, args):
exit('ERROR: We cannot seem to locate a FLAC to convert. Try using the -f/--file argument.')
magic_file = magic.open(magic.MAGIC_MIME)
magic_file.load()
if not magic_file.file(conf['episode']['raw']) == 'audio/x-flac; charset=binary':
if magic_file.file(conf['episode']['raw']) not in ('audio/x-flac; charset=binary',
'audio/flac; charset=binary'):
exit('ERROR: Your FLAC file does not seem to actually be FLAC.')
conf['flac'] = {}
conf['flac']['samples'] = subprocess.check_output(['metaflac',