This commit is contained in:
Rodney Ewing 2013-08-01 15:58:25 -07:00
parent 065db04730
commit bf909ab048

View File

@ -50,8 +50,8 @@ def _set_media_type(args):
if not args[0].type: if not args[0].type:
args[0].type = media_type args[0].type = media_type
elif args[0].type != media_type: elif args[0].type != media_type:
raise Exception(_('The --type that you set does not match the type' raise Exception(_('The --type that you set does not match the'
' of the given media_id.')) 'type of the given media_id.'))
elif len(args[0].media_id) > 1: elif len(args[0].media_id) > 1:
media_types = [] media_types = []
@ -60,14 +60,14 @@ def _set_media_type(args):
.media_type.split('.')[-1]) .media_type.split('.')[-1])
for type in media_types: for type in media_types:
if media_types[0] != type: if media_types[0] != type:
raise Exception((u'You cannot reprocess different media_types' raise Exception((u'You cannot reprocess different'
' at the same time.')) ' media_types at the same time.'))
if not args[0].type: if not args[0].type:
args[0].type = media_types[0] args[0].type = media_types[0]
elif args[0].type != media_types[0]: elif args[0].type != media_types[0]:
raise Exception(_('The --type that you set does not match the type' raise Exception(_('The --type that you set does not match the'
' of the given media_ids.')) ' type of the given media_ids.'))
def _reprocess_all(args): def _reprocess_all(args):
@ -128,8 +128,8 @@ def _set_media_state(args):
.state) .state)
for state in media_states: for state in media_states:
if state != media_states[0]: if state != media_states[0]:
raise Exception(_('You can only reprocess media that is in the' raise Exception(_('You can only reprocess media that is in'
' same state.')) ' the same state.'))
args[0].state = media_states[0] args[0].state = media_states[0]