mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Catch all archive extract errors and skip tests without unrar
This commit is contained in:
parent
68595ee09d
commit
1f742130c4
2 changed files with 3 additions and 2 deletions
|
|
@ -665,7 +665,7 @@ def read_tasks(session):
|
|||
archive_task = ArchiveImportTask(toppath)
|
||||
try:
|
||||
archive_task.extract()
|
||||
except IOError as exc:
|
||||
except Exception as exc:
|
||||
log.error('extraction failed: {0}'.format(exc))
|
||||
continue
|
||||
toppath = archive_task.toppath
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from tarfile import TarFile
|
|||
|
||||
import _common
|
||||
from _common import unittest
|
||||
from helper import TestImportSession, TestHelper
|
||||
from helper import TestImportSession, TestHelper, has_program
|
||||
from beets import library
|
||||
from beets import importer
|
||||
from beets.mediafile import MediaFile
|
||||
|
|
@ -342,6 +342,7 @@ class ImportTarTest(ImportZipTest):
|
|||
return path
|
||||
|
||||
|
||||
@unittest.skipIf(not has_program('unrar'), 'unrar program not found')
|
||||
class ImportRarTest(ImportZipTest):
|
||||
|
||||
def create_archive(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue