HomeSoftware Heritage

browse/utils: Use python-magic when available instead of file-magic

Description

browse/utils: Use python-magic when available instead of file-magic

swh-web uses the magic module to detect mime_type and encoding of contents stored
inside the archive. Its is provided by the python-magic package (debian buster)
or by the file-magic package (debian stretch).

As python-magic is more stable than file-magic (see a2759fec6009), prefer to use
it instead. Nevertheless, keep backward compatibility for file-magic as it is
currently used in production environment.

Details

Provenance
anlambertAuthored on Aug 1 2019, 2:15 PM
anlambertPushed on Aug 1 2019, 3:38 PM
Parents
rDWAPPS81e9970a507d: requirements-swh.txt: Bump swh-storage version
Branches
Unknown
Tags
Unknown
Build Status
Buildable 7111
Build 10026: Cypress tests for swh-web commits
Build 10025: test-and-build