mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
Don't crash if a magic number can't be used
This should fix the anki build crashing.
This commit is contained in:
parent
0283fa0aa6
commit
5167e3d771
1 changed files with 4 additions and 1 deletions
|
@ -1460,7 +1460,10 @@ def scan_source(build_dir, root_dir, thisbuild):
|
|||
if toignore(fd):
|
||||
continue
|
||||
|
||||
mime = magic.from_file(fp, mime=True) if ms is None else ms.file(fp)
|
||||
try:
|
||||
mime = magic.from_file(fp, mime=True) if ms is None else ms.file(fp)
|
||||
except UnicodeError:
|
||||
warnproblem('malformed magic number', fd, fp)
|
||||
|
||||
if mime == 'application/x-sharedlib':
|
||||
count += handleproblem('shared library', fd, fp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue