aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-github-lambda/lambda_function.py.in
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-05-01 20:48:04 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-05-01 20:48:04 +0200
commit34ee836a19c550c1f2b19baa6f4ac3f2a48695d0 (patch)
tree37239a48cd7409df27ec868ddb4f91ac1b1472f7 /src/blogc-github-lambda/lambda_function.py.in
parentc071ac260a24561c889643b7f8df37950a597137 (diff)
downloadblogc-34ee836a19c550c1f2b19baa6f4ac3f2a48695d0.tar.gz
blogc-34ee836a19c550c1f2b19baa6f4ac3f2a48695d0.tar.bz2
blogc-34ee836a19c550c1f2b19baa6f4ac3f2a48695d0.zip
github-lambda: do not override index.html if exists
Diffstat (limited to 'src/blogc-github-lambda/lambda_function.py.in')
-rw-r--r--src/blogc-github-lambda/lambda_function.py.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/blogc-github-lambda/lambda_function.py.in b/src/blogc-github-lambda/lambda_function.py.in
index cafb7c4..37d3828 100644
--- a/src/blogc-github-lambda/lambda_function.py.in
+++ b/src/blogc-github-lambda/lambda_function.py.in
@@ -75,7 +75,9 @@ def translate_filename(filename):
p = basename.split('.')
if len(p) == 2 and p[0] == 'index':
f[-1] = 'index.html'
- return '/'.join(f)
+ f = '/'.join(f)
+ if not os.path.exists(f):
+ return f
return filename