Skip to content

Commit

Permalink
Merge pull request #455 from Birdulon/454fix
Browse files Browse the repository at this point in the history
[CLI] Environment variable fix for #454
  • Loading branch information
z411 committed Sep 5, 2019
2 parents 4b9a71a + 96f00f2 commit 020c0a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trackma/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ def get_terminal_size(fd=1):
hw = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234'))
except:
try:
hw = (os.environ['LINES'], os.environ['COLUMNS'])
width = int(os.environ.get('COLUMNS', 80))
height = int(os.environ.get('LINES', 25))
hw = (height, width)
except:
hw = (25, 80)

Expand Down

0 comments on commit 020c0a2

Please sign in to comment.