]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[compat] Fix wrong lines/columns order
authorSergey M․ <dstftw@gmail.com>
Tue, 6 Oct 2015 16:02:28 +0000 (22:02 +0600)
committerSergey M․ <dstftw@gmail.com>
Tue, 6 Oct 2015 16:02:28 +0000 (22:02 +0600)
stty size is rows x columns

youtube_dl/compat.py

index 1ba4ab78cc44af89f5ff528d0db979a8dff5f3b8..192e1c515e568b73e6bb5a42574fada4af511662 100644 (file)
@@ -434,7 +434,7 @@ else:
                     ['stty', 'size'],
                     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                 out, err = sp.communicate()
-                _columns, _lines = map(int, out.split())
+                _lines, _columns = map(int, out.split())
             except Exception:
                 _columns, _lines = _terminal_size(*fallback)