Fix: create file object

Was broken in case the file was neither PE/ELF/Mach-O
pull/120/head
Raphaël Vinot 2017-09-27 16:05:06 +02:00
parent 6d2576be0a
commit 3e73ae826f
2 changed files with 4 additions and 4 deletions

@ -1 +1 @@
Subproject commit d22ced3b82c4bf3012bf0162831d862685944c9a
Subproject commit 140b55254a5478cb94718d17563c18ce330f45d0

View File

@ -57,11 +57,11 @@ def make_binary_objects(filepath=None, pseudofile=None, filename=None):
elif isinstance(lief_parsed, lief.MachO.Binary):
return make_macho_objects(lief_parsed, misp_file)
except lief.bad_format as e:
warnings.warn('\tBad format: ', e)
warnings.warn('\tBad format: {}'.format(e))
except lief.bad_file as e:
warnings.warn('\tBad file: ', e)
warnings.warn('\tBad file: {}'.format(e))
except lief.parser_error as e:
warnings.warn('\tParser error: ', e)
warnings.warn('\tParser error: {}'.format(e))
except FileTypeNotImplemented as e: # noqa
warnings.warn(e)
if not HAS_LIEF: