Skip to content

Commit

Permalink
Merge pull request xmendez#171 from IgorSasovets/fix/crontab-run
Browse files Browse the repository at this point in the history
Fixes terminal width
  • Loading branch information
xmendez authored Nov 16, 2019
2 parents fc34a8a + 5cf68cb commit a7a8e49
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/wfuzz/ui/console/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def _getTerminalSize_linux():
import struct
import os

terminalSize = None

def ioctl_GWINSZ(fd):
try:
cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234'))
Expand All @@ -151,4 +153,8 @@ def ioctl_GWINSZ(fd):
cr = (os.environ.get('LINES'), os.environ.get('COLUMNS'))
except Exception:
return None
return int(cr[1]), int(cr[0])
try:
terminalSize = [int(cr[1]), int(cr[0])]
except Exception:
terminalSize = None
return terminalSize

0 comments on commit a7a8e49

Please sign in to comment.