aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/reprocess.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-08-01 15:24:34 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-16 15:30:13 -0700
commit11a99d787f899808b10410e271491cbdfb69e55f (patch)
treebe3628e11fb14eea16edfac1aa2ff0af39ce66c2 /mediagoblin/gmg_commands/reprocess.py
parent243756e0205b2c8c009b6ac3e96eca8923508c38 (diff)
downloadmediagoblin-11a99d787f899808b10410e271491cbdfb69e55f.tar.lz
mediagoblin-11a99d787f899808b10410e271491cbdfb69e55f.tar.xz
mediagoblin-11a99d787f899808b10410e271491cbdfb69e55f.zip
refactored _run_reprocessing
Diffstat (limited to 'mediagoblin/gmg_commands/reprocess.py')
-rw-r--r--mediagoblin/gmg_commands/reprocess.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mediagoblin/gmg_commands/reprocess.py b/mediagoblin/gmg_commands/reprocess.py
index cad75c45..60df697f 100644
--- a/mediagoblin/gmg_commands/reprocess.py
+++ b/mediagoblin/gmg_commands/reprocess.py
@@ -85,7 +85,15 @@ def _reprocess_all(args):
def _run_reprocessing(args):
if args[0].available:
- return hook_handle(('reprocess_action', args[0].type), args)
+ if args[0].state == 'failed':
+ print _('\n Available reprocess actions for all failed'
+ ' media_entries: \n \t --initial_processing')
+ else:
+ result = hook_handle(('reprocess_action', args[0].type), args)
+ if not result:
+ print _('Sorry there is no available reprocessing for {}'
+ ' entries in the {} state'.format(args[0].type,
+ args[0].state))
else:
return hook_handle(('media_reprocess', args[0].type), args)