From 54113446221d114a0e5e8d3878884bc5a6cfed3c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 24 Feb 2020 18:40:23 +0000 Subject: [PATCH] Second part --- daemon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index 3a20bd4c..8f377805 100644 --- a/daemon.py +++ b/daemon.py @@ -870,7 +870,9 @@ class PubServer(BaseHTTPRequestHandler): def _pathContainsBlogLink(self,baseDir: str,httpPrefix: str,domain: str,path: str) -> (str,str): """If the path contains a blog entry then return its filename """ - userEnding=path.split('/users/',1) + if '/users/' not in path: + return None,None + userEnding=path.split('/users/',1)[1] print('Test1 '+path+' '+str(userEnding)) if '/' not in userEnding: return None,None