diff options
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 7 |
1 files changed, 3 insertions, 4 deletions
| @@ -20,9 +20,8 @@ def create_arg_parser(): | |||
| 20 | return parser | 20 | return parser |
| 21 | 21 | ||
| 22 | def show_meta(filename:str): | 22 | def show_meta(filename:str): |
| 23 | p = parser_factory.get_parser(filename) | 23 | p, mtype = parser_factory.get_parser(filename) |
| 24 | if p is None: | 24 | if p is None: |
| 25 | mtype, _ = mimetypes.guess_type(filename) | ||
| 26 | print("[-] %s's format (%s) is not supported" % (filename, mtype)) | 25 | print("[-] %s's format (%s) is not supported" % (filename, mtype)) |
| 27 | return | 26 | return |
| 28 | for k,v in p.get_meta().items(): | 27 | for k,v in p.get_meta().items(): |
| @@ -38,9 +37,9 @@ def main(): | |||
| 38 | return 0 | 37 | return 0 |
| 39 | 38 | ||
| 40 | for f in args.files: | 39 | for f in args.files: |
| 41 | p = parser_factory.get_parser(f) | 40 | p, mtype = parser_factory.get_parser(f) |
| 42 | if p is None: | 41 | if p is None: |
| 43 | print("[-] %s's format (%s) is not supported" % (f, "meh")) | 42 | print("[-] %s's format (%s) is not supported" % (f, mtype)) |
| 44 | continue | 43 | continue |
| 45 | p.remove_all() | 44 | p.remove_all() |
| 46 | 45 | ||
