Skip to content

Commit

Permalink
hotfix for issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
SamBaRufus committed May 15, 2019
1 parent 659b1cf commit dfa6aad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions display_manager_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# implied warranties of any kind. #
########################################################################

# Display Manager, version 1.0.1
# Display Manager, version 1.0.2
# Python Library

# Programmatically manages Mac displays.
Expand Down Expand Up @@ -265,6 +265,7 @@ def allModes(self):
"""
:return: All possible Quartz "DisplayMode" interfaces for this display.
"""
# TO-DO: This needs to be revisited
modes = []
# options forces Quartz to show HiDPI modes
options = {Quartz.kCGDisplayShowDuplicateLowResolutionModes: True}
Expand All @@ -288,7 +289,10 @@ def allModes(self):
defaultMode.hidpi == mode.hidpi,
not mode.isDefault,
]):
uniqueModes.remove(mode)
try:
uniqueModes.remove(mode)
except KeyError:
pass

return list(uniqueModes)

Expand Down

0 comments on commit dfa6aad

Please sign in to comment.