aboutsummaryrefslogtreecommitdiff
path: root/cgi/weabot.py
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/weabot.py')
-rwxr-xr-xcgi/weabot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgi/weabot.py b/cgi/weabot.py
index a85c2e7..f5451d9 100755
--- a/cgi/weabot.py
+++ b/cgi/weabot.py
@@ -39,7 +39,7 @@ class weabot(object):
self.start = start_response
- if self.environ["QUERY_STRING"] != "rawpost":
+ if self.environ.get("QUERY_STRING") != "rawpost":
self.formdata = getFormData(self)
self.output = ""
@@ -599,7 +599,7 @@ class weabot(object):
# process files
if oek_file:
try:
- fname = "%s/%s/temp/%s.png" % (Settings.IMAGES_DIR, board['dir'], oek_file)
+ fname = os.path.join(Settings.IMAGES_DIR, board['dir'], "temp", oek_file + ".png")
with open(fname, 'rb') as f:
file = f.read()
except: