From ed5f1c9b0a85f5003d2ad538514f986e56926988 Mon Sep 17 00:00:00 2001 From: nautics889 Date: Tue, 11 Apr 2023 22:51:57 +0300 Subject: [PATCH] fix: Minor fixes in terminatorlib/configjson.py Remove unused import of 'sys' module; Fix typo in log message; Removed unused variable in `get_layout()` method. --- terminatorlib/configjson.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/terminatorlib/configjson.py b/terminatorlib/configjson.py index 48c6ab5a..1755cab0 100644 --- a/terminatorlib/configjson.py +++ b/terminatorlib/configjson.py @@ -1,6 +1,5 @@ from .util import dbg, err from os import path -import sys import json import copy from .config import Config @@ -8,6 +7,7 @@ from .config import Config JSON_PROFILE_NAME = "__internal_json_profile__" JSON_LAYOUT_NAME = "__internal_json_layout__" + class ConfigJson(object): profile_to_use = 'default' @@ -73,7 +73,7 @@ class ConfigJson(object): self.build_terminal_layout(layoutjson, children, parent, order) return - dbg ('Building %s layout from json: %s' % ("vertical" if vertical else "horizental", layoutjson)) + dbg ('Building %s layout from json: %s' % ("vertical" if vertical else "horizontal", layoutjson)) counter = 0 actualparent = parent @@ -105,9 +105,7 @@ class ConfigJson(object): if "vertical" in layoutjson: vertical = layoutjson["vertical"] del layoutjson["vertical"] - - result = None - + if len(layoutjson) == 1: firstitem = next(iter(layoutjson.values())) result = self.build_single_tab_layout(firstitem, vertical)