Fixed the BUG(OSError: [Errno 25] Inappropriate ioctl for device) that has been occurred when use this script on background via nohup.

This commit is contained in:
Sadam·Sadik
2022-12-10 19:15:04 +08:00
parent 7bac1004cb
commit e963da457a
+5 -1
View File
@@ -326,7 +326,11 @@ def generate_logo() -> list:
font = random.choice(ingram_fonts).split('\n')
font_width = max([len(i) for i in font])
font_height = len(font)
if font_width + icon_width + 2 < os.get_terminal_size()[0]:
try:
if font_width + icon_width + 2 < os.get_terminal_size()[0]:
found = True
break
except:
found = True
break
if not found: