Skip to content

Commit

Permalink
Switch to shutil for getting terminal size
Browse files Browse the repository at this point in the history
Due to possible permissions issues with automated testing switching to shutil to indirectly call os.get_terminal_size() is best.
  • Loading branch information
Evolution0 committed Mar 10, 2018
1 parent 7dd655c commit 243e537
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bandcamp_dl/utils/clean_print.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import shutil


def print_clean(msg):
terminal_size = os.get_terminal_size()
terminal_size = shutil.get_terminal_size()
msg_length = len(msg)
print("{}{}".format(msg, " " * (int(terminal_size[0]) - msg_length)), end='')
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from os import path
import sys

appversion = "0.0.8-11"
appversion = "0.0.8-12"

here = path.abspath(path.dirname(__file__))

Expand Down

1 comment on commit 243e537

@ilovezfs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Evolution0!

Please sign in to comment.