messy fixes of untyped languages

This commit is contained in:
crunk 2024-12-29 12:49:17 +01:00
parent 856f88b15e
commit 74bc1be643
2 changed files with 6 additions and 9 deletions

View File

@ -109,14 +109,9 @@ def _delete_distribusi_files(distribusiname):
cssfolder = os.path.join("themes/userthemes", distribusiname)
if os.path.exists(cssfolder):
shutil.rmtree(cssfolder)
distribusi = Distribusis.query.filter_by(
distribusiname=distribusiname
).first()
if distribusi.publictheme is not None:
publicthemefolder = os.path.join("themes/publicthemes", distribusiname)
if os.path.exists(publicthemefolder):
shutil.rmtree(publicthemefolder)
publicthemefolder = os.path.join("themes/publicthemes", distribusiname)
if os.path.exists(publicthemefolder):
shutil.rmtree(publicthemefolder)
def _delete_distribusi_database_files(distribusiname):

View File

@ -94,8 +94,10 @@ def get_css_file(distribusi):
def run_distribusi(userfolder, cssfile):
shutil.copy(cssfile, userfolder)
stash_css_file = os.path.join(userfolder, os.path.basename(cssfile))
APP.logger.info(
f"Run distribusi on this folder: {userfolder} with css:{cssfile}"
f"Run distribusi on this folder: {userfolder} with css:{stash_css_file}"
)
distribusify(userfolder, cssfile)