bug 1049202 - remove automationutils mozinfo workaround for non-mozharness Android tests. r=jmaher

This commit is contained in:
Ted Mielczarek 2014-08-11 07:46:46 -04:00
parent 13dcd9eb3e
commit 96a23f8aff

View File

@ -15,28 +15,7 @@ import sys
import tempfile
from urlparse import urlparse
import zipfile
try:
import mozinfo
except ImportError:
# Stub out fake mozinfo since this is not importable on Android 4.0 Opt.
# This should be fixed; see
# https://bugzilla.mozilla.org/show_bug.cgi?id=650881
mozinfo = type('mozinfo', (), dict(info={}))()
mozinfo.isWin = mozinfo.isLinux = mozinfo.isUnix = mozinfo.isMac = False
# TODO! FILE: localautomation :/
# mapping from would-be mozinfo attr <-> sys.platform
mapping = {'isMac': ['mac', 'darwin'],
'isLinux': ['linux', 'linux2'],
'isWin': ['win32', 'win64'],
}
mapping = dict(sum([[(value, key) for value in values] for key, values in mapping.items()], []))
attr = mapping.get(sys.platform)
if attr:
setattr(mozinfo, attr, True)
if mozinfo.isLinux:
mozinfo.isUnix = True
import mozinfo
__all__ = [
"ZipFileReader",