mirror of https://github.com/aristocratos/bpytop
Fix init screen and error log level when starting from pip installation
parent
17fad3d834
commit
6e84fadabc
10
bpytop.py
10
bpytop.py
|
@ -474,9 +474,7 @@ class Config:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
CONFIG: Config = Config(CONFIG_FILE)
|
CONFIG: Config = Config(CONFIG_FILE)
|
||||||
if not __name__ == "__main__":
|
if DEBUG:
|
||||||
errlog.setLevel(logging.ERROR)
|
|
||||||
elif DEBUG:
|
|
||||||
errlog.setLevel(logging.DEBUG)
|
errlog.setLevel(logging.DEBUG)
|
||||||
else:
|
else:
|
||||||
errlog.setLevel(getattr(logging, CONFIG.log_level))
|
errlog.setLevel(getattr(logging, CONFIG.log_level))
|
||||||
|
@ -509,9 +507,6 @@ class Term:
|
||||||
"""Terminal info and commands"""
|
"""Terminal info and commands"""
|
||||||
width: int = 0
|
width: int = 0
|
||||||
height: int = 0
|
height: int = 0
|
||||||
if __name__ == "__main__":
|
|
||||||
width = os.get_terminal_size().columns
|
|
||||||
height = os.get_terminal_size().lines
|
|
||||||
resized: bool = False
|
resized: bool = False
|
||||||
_w : int = 0
|
_w : int = 0
|
||||||
_h : int = 0
|
_h : int = 0
|
||||||
|
@ -4408,6 +4403,9 @@ THEME: Theme
|
||||||
def main():
|
def main():
|
||||||
global THEME
|
global THEME
|
||||||
|
|
||||||
|
Term.width = os.get_terminal_size().columns
|
||||||
|
Term.height = os.get_terminal_size().lines
|
||||||
|
|
||||||
#? Init -------------------------------------------------------------------------------------->
|
#? Init -------------------------------------------------------------------------------------->
|
||||||
if DEBUG: TimeIt.start("Init")
|
if DEBUG: TimeIt.start("Init")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue