aboutsummaryrefslogtreecommitdiff
path: root/cgi/weabot.py
diff options
context:
space:
mode:
authorLibravatar z411 2019-04-01 16:52:42 -0300
committerLibravatar z411 2019-04-01 18:21:56 -0300
commit770acfd68a6c4cbf2e62bb9b129b8ccc446f01ab (patch)
tree55727c5694bd85c65b8a4d7a9da4e38f9f0f410b /cgi/weabot.py
parentff6bf1b045fa810989a3efc78624123d3fc97f19 (diff)
downloadweabot-770acfd68a6c4cbf2e62bb9b129b8ccc446f01ab.tar.gz
weabot-770acfd68a6c4cbf2e62bb9b129b8ccc446f01ab.tar.xz
weabot-770acfd68a6c4cbf2e62bb9b129b8ccc446f01ab.zip
oekaki: Usando os.path.join
PS: En realidad esta es la forma correcta de trabajar con directorios en Python. Lo ideal sería corregir la aplicación completa para que se utilice (en vez de concats ordinarios) y quitar el trailing slash desde los directorios en la configuración.
Diffstat (limited to 'cgi/weabot.py')
-rwxr-xr-xcgi/weabot.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgi/weabot.py b/cgi/weabot.py
index a85c2e7..5757df2 100755
--- a/cgi/weabot.py
+++ b/cgi/weabot.py
@@ -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: