Skip to content

Commit c413edd

Browse files
committed
Handle monitors that have no manufacturer/model names
As in GH actions CI.
1 parent 0990ded commit c413edd

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.github/workflows/draft_release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ jobs:
5252
- name: Test starting pympress and quitting from the command line
5353
if: always()
5454
run: |
55-
pympress &
5655
pympress --quit
57-
wait %1
5856
5957
- name: Check the log has been created from the previous step
6058
if: always()

pympress/ui.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,9 +2004,8 @@ def lookup_monitors(display, *windows):
20042004
the best monitor areas for primary and non-primary monitors
20052005
"""
20062006
# Helpful for debugging
2007-
name = [mon.get_manufacturer() + ' ' + mon.get_model() for mon in (
2008-
display.get_monitor(n) for n in range(display.get_n_monitors())
2009-
)]
2007+
name = ['{} {}'.format(mon.get_manufacturer() or 'Unknown manufacturer', mon.get_model() or 'Unknown model')
2008+
for mon in (display.get_monitor(n) for n in range(display.get_n_monitors()))]
20102009

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

0 commit comments

Comments
 (0)