Merge branch 'cc-5709-airtime-analyzer' into cc-5709-airtime-analyzer-saas

This commit is contained in:
Albert Santoni 2014-06-03 12:44:35 -04:00
commit 65ea0e6d6f
2 changed files with 31 additions and 24 deletions

View file

@ -132,7 +132,10 @@ class MetadataAnalyzer(Analyzer):
# Some tags are returned as lists because there could be multiple values.
# This is unusual so we're going to always just take the first item in the list.
if isinstance(metadata[airtime_tag], list):
metadata[airtime_tag] = metadata[airtime_tag][0]
if metadata[airtime_tag]:
metadata[airtime_tag] = metadata[airtime_tag][0]
else: # Handle empty lists
metadata[airtime_tag] = ""
except KeyError:
continue