don't list directory contents of something that is empty

This commit is contained in:
crunk 2022-04-04 22:00:35 +02:00
parent 76de0b10cb
commit e7f7d7c34d

View File

@ -92,6 +92,7 @@ def RemoveMacFolders(path):
def GetCssFile(distribusi): def GetCssFile(distribusi):
cssfile = "" cssfile = ""
cssfolder = os.path.join("themes/userthemes", distribusi.distribusiname) cssfolder = os.path.join("themes/userthemes", distribusi.distribusiname)
if os.path.exists(cssfolder):
for filename in os.listdir(cssfolder): for filename in os.listdir(cssfolder):
if filename.endswith(".css"): if filename.endswith(".css"):
cssfile = os.path.join(cssfolder, filename) cssfile = os.path.join(cssfolder, filename)