From 58137b95c285f01be8dbfee48f859e242b511461 Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Sat, 1 Aug 2015 16:23:54 -0700 Subject: [PATCH] python 3.4 hack --- tildetown-py/cgi.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tildetown-py/cgi.py b/tildetown-py/cgi.py index a15e6ca..021a81e 100644 --- a/tildetown-py/cgi.py +++ b/tildetown-py/cgi.py @@ -7,6 +7,17 @@ from tempfile import mkdtemp, mkstemp from flask import Flask, render_template, request, redirect from stats import get_data +## disgusting hack for python 3.4 +import pkgutil +orig_get_loader = pkgutil.get_loader +def get_loader(name): + try: + return orig_get_loader(name) + except AttributeError: + pass +pkgutil.get_loader = get_loader +########### + SITE_NAME = 'tilde.town' app = Flask('~cgi')