Skip to content

Commit

Permalink
Fix printing
Browse files Browse the repository at this point in the history
  • Loading branch information
piatrashkakanstantinass committed Jun 6, 2021
1 parent 6905307 commit 95566f0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pywhat/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ def pretty_print(self, text: dict):

to_out = ""

if text["File Signatures"]:
if text["File Signatures"] and text["Regexes"]:
to_out += "\n"
to_out += f"[bold #D7Afff]File Identified[/bold #D7Afff] with Magic Numbers {text['File Signatures']['ISO 8859-1']}."
to_out += f"\n[bold #D7Afff]File Description:[/bold #D7Afff] {text['File Signatures']['Description']}."
to_out += "\n"
if to_out:
console.print(to_out)

if text["Regexes"]:
to_out += "\n[bold #D7Afff]Possible Identification[/bold #D7Afff]"
Expand Down

0 comments on commit 95566f0

Please sign in to comment.