mirror of https://gitlab.com/bashrc2/epicyon
Fix css
parent
0a656ab9ca
commit
c6c17f4743
|
@ -7309,11 +7309,15 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# get css
|
# get css
|
||||||
# Note that this comes before the busy flag to avoid conflicts
|
# Note that this comes before the busy flag to avoid conflicts
|
||||||
if self.path.endswith('.css'):
|
if self.path.endswith('.css'):
|
||||||
if os.path.isfile('epicyon-profile.css'):
|
# get the last part of the path
|
||||||
|
# eg. /my/path/file.css becomes file.css
|
||||||
|
if '/' in self.path:
|
||||||
|
self.path = self.path.split('/')[-1]
|
||||||
|
if os.path.isfile(self.path):
|
||||||
tries = 0
|
tries = 0
|
||||||
while tries < 5:
|
while tries < 5:
|
||||||
try:
|
try:
|
||||||
with open('epicyon-profile.css', 'r') as cssfile:
|
with open(self.path, 'r') as cssfile:
|
||||||
css = cssfile.read()
|
css = cssfile.read()
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue