Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2008-05-23 23:33:59 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2008-05-23 23:33:59 (GMT)
commitb3ff69e40a788003fa31cef4d410e8d818cd83fc (patch)
tree79175e3d2116aabbd6f2f5288173aed21c959563 /server.py
parent6f7eace8b6056d820fb8239b97dee834ec524ca3 (diff)
Fix images path to be relative to es_PE/
Diffstat (limited to 'server.py')
-rwxr-xr-xserver.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.py b/server.py
index 8bc586a..e54af95 100755
--- a/server.py
+++ b/server.py
@@ -109,14 +109,14 @@ class WPImageDB:
def getPath(self, name, size=None):
hashed_name = self.hashpath(name)
- path = 'images/%s' % hashed_name
+ path = 'es_PE/images/%s' % hashed_name
#print "getPath: %s -> %s" % (name.encode('utf8'), path.encode('utf8'))
return path
def getURL(self, name, size=None):
hashed_name = self.hashpath(name)
- if os.path.exists('images/' + hashed_name):
- url = '/images/' + hashed_name
+ if os.path.exists('es_PE/images/' + hashed_name):
+ url = '/es_PE/images/' + hashed_name
else:
url = 'http://upload.wikimedia.org/wikipedia/commons/' + hashed_name
#print "getUrl: %s -> %s" % (name.encode('utf8'), url.encode('utf8'))
@@ -458,7 +458,7 @@ class WikiRequestHandler(SimpleHTTPRequestHandler):
self.wfile.write("</body></html>")
def send_image(self, path):
- if os.path.exists('images/' + path):
+ if os.path.exists('es_PE/images/' + path):
# If image exists locally, serve it as normal.
SimpleHTTPRequestHandler.do_GET(self)
else: