Skip to content

Commit

Permalink
Handle monitors that have no manufacturer/model names
Browse files Browse the repository at this point in the history
As in GH actions CI.
  • Loading branch information
Cimbali committed Mar 14, 2023
1 parent 0990ded commit c413edd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ jobs:
- name: Test starting pympress and quitting from the command line
if: always()
run: |
pympress &
pympress --quit
wait %1
- name: Check the log has been created from the previous step
if: always()
Expand Down
5 changes: 2 additions & 3 deletions pympress/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2004,9 +2004,8 @@ def lookup_monitors(display, *windows):
the best monitor areas for primary and non-primary monitors
"""
# Helpful for debugging
name = [mon.get_manufacturer() + ' ' + mon.get_model() for mon in (
display.get_monitor(n) for n in range(display.get_n_monitors())
)]
name = ['{} {}'.format(mon.get_manufacturer() or 'Unknown manufacturer', mon.get_model() or 'Unknown model')
for mon in (display.get_monitor(n) for n in range(display.get_n_monitors()))]

all_geom = [ScreenArea(display.get_monitor(n).get_geometry(), name[n]) for n in range(display.get_n_monitors())]
# Remove duplicate monitors (“mirrored”)
Expand Down

0 comments on commit c413edd

Please sign in to comment.