diff --git a/client-cli/pvc/cli/helpers.py b/client-cli/pvc/cli/helpers.py index b6c9a6f9..ca811be0 100644 --- a/client-cli/pvc/cli/helpers.py +++ b/client-cli/pvc/cli/helpers.py @@ -46,8 +46,12 @@ DEFAULT_API_PREFIX = "/api/v1" DEFAULT_NODE_HOSTNAME = gethostname().split(".")[0] DEFAULT_AUTOBACKUP_FILENAME = "/etc/pvc/pvc.conf" -# Define the content width to be the maximum temminal size -MAX_CONTENT_WIDTH = get_terminal_size().columns - 1 +try: + # Define the content width to be the maximum terminal size + MAX_CONTENT_WIDTH = get_terminal_size().columns - 1 +except OSError: + # Fall back to 80 columns if "Inappropriate ioctl for device" + MAX_CONTENT_WIDTH = 80 def echo(config, message, newline=True, stderr=False):