Get css from cache

merge-requests/8/head
Bob Mottram 2020-11-10 15:23:30 +00:00
parent 8bddaaf136
commit a99063bb64
1 changed files with 4 additions and 2 deletions

View File

@ -166,6 +166,7 @@ from shares import getSharesFeedForPerson
from shares import addShare
from shares import removeShare
from shares import expireShares
from utils import getCSS
from utils import firstParagraphFromString
from utils import clearFromPostCaches
from utils import containsInvalidChars
@ -8279,8 +8280,9 @@ class PubServer(BaseHTTPRequestHandler):
tries = 0
while tries < 5:
try:
with open(path, 'r') as cssfile:
css = cssfile.read()
css = getCSS(self.server.baseDir, path,
self.server.cssCache)
if css:
break
except Exception as e:
print(e)