# Copyright 2012-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 import re import subprocess import sys from portage import _unicode_encode, _unicode_decode from portage.util import writemsg from portage.util.configparser import RawConfigParser, read_configs def parse_desktop_entry(path): """ Parse the given file with RawConfigParser and return the result. This may raise an IOError from io.open(), or a ParsingError from RawConfigParser. """ parser = RawConfigParser() read_configs(parser, [path]) return parser _trivial_warnings = re.compile( r" looks " # >=desktop-file-utils-0.25 r"(?:the same as that of key|" #