generate-alt-random: don’t run TIOCGWINSZ ioctl if --cols and --rows were used

This commit is contained in:
Daniel Eklöf 2021-04-22 11:20:55 +02:00
parent 10e512f14f
commit a9236129f6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -38,6 +38,7 @@ def main():
opts = parser.parse_args() opts = parser.parse_args()
out = opts.out if opts.out is not None else sys.stdout out = opts.out if opts.out is not None else sys.stdout
if opts.rows is None or opts.cols is None:
try: try:
def dummy(*args): def dummy(*args):
"""Need a handler installed for sigwait() to trigger.""" """Need a handler installed for sigwait() to trigger."""