Skip to content

Commit 85cca30

Browse files
committed
output format detection
1 parent 909dcc0 commit 85cca30

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/monkeyplug/monkeyplug.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,12 @@ def __init__(
306306
self.outputFileSpec = oFileSpec if oFileSpec else self.inputFileParts[0] + "_clean"
307307
if self.outputFileSpec:
308308
outParts = os.path.splitext(self.outputFileSpec)
309-
if ((not oAudioFileFormat) or (str(oAudioFileFormat).upper() == AUDIO_MATCH_FORMAT)) and oFileSpec:
309+
if (
310+
((not oAudioFileFormat) or (str(oAudioFileFormat).upper() == AUDIO_MATCH_FORMAT))
311+
and oFileSpec
312+
and (len(outParts) > 1)
313+
and outParts[1]
314+
):
310315
oAudioFileFormat = outParts[1]
311316

312317
if str(oAudioFileFormat).upper() == AUDIO_MATCH_FORMAT:

0 commit comments

Comments
 (0)