def get_localepicker(self): """ For a file that is part of a language pack, extract the chrome/localepicker.properties file and return as a string. """ start = time.time() zip = SafeUnzip(self.file_path) if not zip.is_valid(fatal=False): return '' try: manifest = zip.extract_path('chrome.manifest') except KeyError, e: log.info('No file named: chrome.manifest in file: %s' % self.pk) return ''
def test_extract_path(self): zip_file = SafeUnzip(self.xpi_path('langpack-localepicker')) assert zip_file.is_valid() assert 'locale browser de' in zip_file.extract_path('chrome.manifest')
def test_extract_path(self): zip_file = SafeUnzip(self.xpi_path('langpack-localepicker')) assert zip_file.is_valid() assert'locale browser de' in zip_file.extract_path('chrome.manifest')