main
Bob Mottram 2020-02-24 18:36:08 +00:00
parent 374847b943
commit 22487db89f
1 changed files with 3 additions and 3 deletions

View File

@ -870,19 +870,19 @@ class PubServer(BaseHTTPRequestHandler):
def _pathContainsBlogLink(self,baseDir: str,httpPrefix: str,domain: str,path: str) -> (str,str): def _pathContainsBlogLink(self,baseDir: str,httpPrefix: str,domain: str,path: str) -> (str,str):
"""If the path contains a blog entry then return its filename """If the path contains a blog entry then return its filename
""" """
print('Test1')
userEnding=path.split('/users/') userEnding=path.split('/users/')
print('Test1 '+path+' '+str(userEnding))
if '/' not in userEnding: if '/' not in userEnding:
return None,None return None,None
print('Test2')
userEnding=userEnging.split('/') userEnding=userEnging.split('/')
print('Test2 '+str(userEnding))
if len(userEnding)!=2: if len(userEnding)!=2:
return None,None return None,None
print('Test3') print('Test3')
if len(userEnding[1])<14: if len(userEnding[1])<14:
return None,None return None,None
print('Test4')
userEnding[1]=userEnding[1].strip() userEnding[1]=userEnding[1].strip()
print('Test4 '+str(userEnding[1]))
if not userEnding[1].isdigit(): if not userEnding[1].isdigit():
return None,None return None,None
print('Test5') print('Test5')