Skip to content

Commit

Permalink
Fix get_monitors() error when no enumerators available (#4506)
Browse files Browse the repository at this point in the history
  • Loading branch information
tehcoderer authored Mar 17, 2023
1 parent f6c4554 commit eef99b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion openbb_terminal/helper_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,11 @@ def str_to_bool(value) -> bool:

def get_screeninfo():
"""Get screeninfo."""
screens = get_monitors() # Get all available monitors
try:
screens = get_monitors() # Get all available monitors
except Exception:
return None

if screens:
current_user = get_current_user()
if (
Expand All @@ -1228,6 +1232,7 @@ def get_screeninfo():
main_screen = screens[monitor] # Choose what monitor to get

return (main_screen.width, main_screen.height)

return None


Expand Down

0 comments on commit eef99b6

Please sign in to comment.