diff --git a/gyp/pylib/gyp/easy_xml.py b/gyp/pylib/gyp/easy_xml.py index ed67618742..8be319087f 100644 --- a/gyp/pylib/gyp/easy_xml.py +++ b/gyp/pylib/gyp/easy_xml.py @@ -122,7 +122,7 @@ def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False, win32=False default_encoding = locale.getdefaultlocale()[1] if default_encoding and default_encoding.upper() != encoding.upper(): - if (sys.version_info[0] >= 3) and (sys.version_info[1] >= 7): + if sys.version_info >= (3, 7): xml_string = xml_string.encode(encoding) else: xml_string = xml_string.decode("cp1251").encode(encoding)