Makes jetpack metadata do the right thing for apps (bug 704692)

This commit is contained in:
Kumar McMillan 2011-11-23 10:38:26 -06:00
Родитель d6acf1836c
Коммит ee8d39f707
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -183,7 +183,11 @@ class File(amo.models.OnChangeMixin, amo.models.ModelBase):
@classmethod
def get_jetpack_metadata(cls, path):
data = {'sdkVersion': None, 'builderVersion': None}
zip_ = zipfile.ZipFile(path)
try:
zip_ = zipfile.ZipFile(path)
except zipfile.BadZipfile:
# This path is not an XPI. It's probably an app manifest.
return data
name = 'harness-options.json'
if name in zip_.namelist():
try: