python 3.4 hack

master
nathaniel smith 2015-08-01 16:23:54 -07:00
parent dc4aec8b95
commit 58137b95c2
1 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,17 @@ from tempfile import mkdtemp, mkstemp
from flask import Flask, render_template, request, redirect from flask import Flask, render_template, request, redirect
from stats import get_data 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' SITE_NAME = 'tilde.town'
app = Flask('~cgi') app = Flask('~cgi')