Skip to content

Commit

Permalink
Merge pull request #10 from Ltnicles/main
Browse files Browse the repository at this point in the history
Fixed when redirecting output to a file
  • Loading branch information
keraattin authored Dec 16, 2022
2 parents e823d4c + 945ff3b commit 648f564
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions email-analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ def get_attachments(filename : str):
)
args = parser.parse_args()

# Get Terminal Column Size
terminal_size = os.get_terminal_size()
# Set Terminal Column Size
TER_COL_SIZE = terminal_size.columns
# If we are in a terminal
if sys.stdout.isatty():
# Get Terminal Column Size
terminal_size = os.get_terminal_size()
# Set Terminal Column Size
TER_COL_SIZE = terminal_size.columns

# Filename
if args.filename:
Expand Down

0 comments on commit 648f564

Please sign in to comment.