From 32ba7efcfc11e52124f9d66b7b1644a3f6b564e0 Mon Sep 17 00:00:00 2001 From: Natalie Foust-Pilcher Date: Thu, 12 Jun 2014 14:12:34 -0400 Subject: [PATCH] Fixed a fatal error causing mediagoblin to crash when certain types of media were uploaded --- mediagoblin/plugins/metadata_display/lib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mediagoblin/plugins/metadata_display/lib.py b/mediagoblin/plugins/metadata_display/lib.py index 0985208c..2530d00f 100644 --- a/mediagoblin/plugins/metadata_display/lib.py +++ b/mediagoblin/plugins/metadata_display/lib.py @@ -19,7 +19,11 @@ def rdfa_to_readable(rdfa_predicate): A simple script to convert rdfa resource descriptors into a form more accessible for humans. """ - readable = rdfa_predicate.split(u":")[1].capitalize() + components = rdfa_predicate.split(u":") + if len(components) >= 2: + readable = [1].capitalize() + else: + readable = u"" return readable def add_rdfa_to_readable_to_media_home(context): -- 2.25.1