summaryrefslogtreecommitdiffstats
path: root/core/views/expo.py
diff options
context:
space:
mode:
authorMartin Green <martin.speleo@gmail.com>2022-06-19 01:02:41 +0100
committerMartin Green <martin.speleo@gmail.com>2022-06-19 01:02:41 +0100
commit5666f1e9a7b78363cff71cf915f52775f25c8695 (patch)
treebbbeeaa410658e63d62e7206226d4eaad33cf20b /core/views/expo.py
parentb39a57786d106943a467e6fdc378d0c8d65fda99 (diff)
downloadtroggle-5666f1e9a7b78363cff71cf915f52775f25c8695.tar.gz
troggle-5666f1e9a7b78363cff71cf915f52775f25c8695.tar.bz2
troggle-5666f1e9a7b78363cff71cf915f52775f25c8695.zip
test
Diffstat (limited to 'core/views/expo.py')
-rw-r--r--core/views/expo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index c57d5cf..0719791 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -281,8 +281,8 @@ def editexpopage(request, path):
pass
try:
- filepath = os.path.normpath(Path(settings.EXPOWEB) / path)
- o = open(filepath.encode(sysdefaultencoding), "r")
+ filepath = Path(settings.EXPOWEB) / path
+ o = open(os.path.normpath(filepath).encode(sysdefaultencoding), "r")
html = o.read()
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
if autogeneratedmatch:
@@ -325,7 +325,7 @@ def editexpopage(request, path):
body = body.replace("\r", "")
result = "%s<head%s>%s</head>%s<body%s>\n%s</body>%s" % (preheader, headerargs, head, postheader, bodyargs, body, postbody)
- cwd = Path(filepath).parent
+ cwd = filepath.parent
filename = filepath.name
git = settings.GIT
# GIT see also core/models/cave.py writetrogglefile()