Skip to content

Commit

Permalink
Fixed the BUG(OSError: [Errno 25] Inappropriate ioctl for device) tha…
Browse files Browse the repository at this point in the history
…t has been occurred when use this script on background via nohup.
  • Loading branch information
Haoke98 committed Dec 10, 2022
1 parent 7bac100 commit e963da4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Ingram/utils/logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e963da4

Please sign in to comment.