

@cherrypy.expose
def email(self, *paths, **_ignored):
    email_name = '/'.join(paths)
    email_path = os.path.join(self.settings.source, email_name)
    if os.path.isdir(email_path):
        return self.edit_renderer.directory(('Contents of ' + (email_name or 'source directory')), self.settings.source, email_name, '/email/{}'.format)
    else:
        (html, subject) = self.final_renderer.render_email(email_path)
        return self.edit_renderer.question(title=html_escape(subject), description=_get_body_content_string(html), actions=[['Edit', '/alter/{}'.format(email_name)], ['Push to repository', '/push/{}'.format(email_name)], ['Update from repository', '/pull/{}'.format(email_name)]])

dataset/ETHPy150Open KeepSafe/ks-email-parser/email_parser/gui/gui.py Server.email/original