try:
mime = magic.from_file(fp, mime=True) if ms is None else ms.file(fp)
except UnicodeError:
- warnproblem('malformed magic number', fd, fp)
+ warnproblem('malformed magic number', fd)
if mime == 'application/x-sharedlib':
count += handleproblem('shared library', fd, fp)