Fix incorrect 'is' in gen_default_modes

During compilation, gen_default_modes.py shows two warnings that
say that a comparison is using 'is' instead of '=='.

This patch fixes this bug.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/985
This commit is contained in:
Sergio Costas 2020-02-10 20:32:07 +01:00
parent 934a829a57
commit 5b1620475e

View File

@ -62,9 +62,9 @@ output_lines = [
def sync_flags(hsync, vsync): def sync_flags(hsync, vsync):
flags = "DRM_MODE_FLAG_" flags = "DRM_MODE_FLAG_"
flags += "NHSYNC" if hsync[0] is '-' else "PHSYNC" flags += "NHSYNC" if hsync[0] == '-' else "PHSYNC"
flags += " | DRM_MODE_FLAG_" flags += " | DRM_MODE_FLAG_"
flags += "NVSYNC" if vsync[0] is '-' else "PVSYNC" flags += "NVSYNC" if vsync[0] == '-' else "PVSYNC"
return flags return flags
def drm_mode_info_from_modeline(line): def drm_mode_info_from_modeline(line):