Browse Source

Another python3 fix

master
Cassowary 2 years ago
parent
commit
08338dc881
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      hackersite.wsgi

+ 3
- 3
hackersite.wsgi View File

@@ -12,7 +12,7 @@ import webob
import mimetypes

try:
config = json.load(file("/srv/dehacker/dehacker.cfg", "r"))
config = json.load(open("/srv/dehacker/dehacker.cfg", "r"))
except:
config = dict()
try:
@@ -25,7 +25,7 @@ import namegenerators

@bobo.resource("/", content_type="text/html")
def index(request):
return file("hackersite.template", "r").read()
return open("hackersite.template", "r").read()


@bobo.query("/namegen", content_type="application/json")
@@ -47,7 +47,7 @@ def statics(bobo_request, f):
if content_type is not None:
response.content_type = content_type
try:
response.body = file(pth, "r").read()
response.body = open(pth, "r").read()
except IOError:
raise bobo.NotFound
return response


Loading…
Cancel
Save