Skip to content

Commit 395b33d

Browse files
committed
raise exception on failed subcategorisation
fixes #97
1 parent cfb3d4e commit 395b33d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pythonbits/bb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def subcategory(self):
8181
elif mime_guess[0] == 'audio':
8282
return AudioSubmission
8383

84+
raise Exception("Unable to guess category using known mimetypes. "
85+
"Consider explicitly specifying the submission "
86+
"category.")
87+
8488
def subcategorise(self):
8589
log.debug('Attempting to narrow category')
8690
SubCategory = self.subcategory()

0 commit comments

Comments
 (0)