def load_cover(self):
if not self.args:<EOL><INDENT>return False<EOL><DEDENT>filename = self.args.get('<STR_LIT>', None)or self.config.get('<STR_LIT>', None)or None<EOL>if not filename:<EOL><INDENT>for extension in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>temp_filename = '<STR_LIT>' % extension<EOL>if exists(temp_filename):<EOL><INDENT>filename = temp_filename<EOL>break<EOL><DEDENT><DEDENT><DEDENT>if filename:<EOL><INDENT>if filename.startswith('<STR_LIT>') orfilename.startswith('<STR_LIT>'):<EOL><INDENT>return filename<EOL><DEDENT>if not exists(filename):<EOL><INDENT>print(error('<STR_LIT>'<EOL>'<STR_LIT>' % filename))<EOL>filename = None<EOL><DEDENT><DEDENT>if not filename:<EOL><INDENT>print(warning('<STR_LIT>'))<EOL>return False<EOL><DEDENT>return abspath(filename)<EOL>
Load the cover out of the config, options and conventions.
        Priority goes this way:

        1. if a --cover option is set, use it.
        2. if there's a "cover" key in the config file, use it.
        3. if a cover.(png|jpg|jpeg|svg) exists in the directory, use it.

        Once the choice is set, the program will check if the file exists
        before using it. If it doesn't exist, you'll be warned and the default
        (ugly) cover will be used.