Compare commits
2 Commits
0d9b516ca2
...
88eb4f3dfa
Author | SHA1 | Date | |
---|---|---|---|
![]() |
88eb4f3dfa | ||
![]() |
6431434609 |
@ -8,7 +8,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
import lxml.etree as etree
|
import lxml.etree as etree
|
||||||
|
|
||||||
from build.lib.misc import get_basepath
|
from build.lib.misc import get_basepath, update_if_changed
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -71,7 +71,10 @@ def _write_localmenus(
|
|||||||
),
|
),
|
||||||
).text = localmenu.text
|
).text = localmenu.text
|
||||||
|
|
||||||
page.getroottree().write(file, xml_declaration=True, encoding="utf-8")
|
update_if_changed(
|
||||||
|
file,
|
||||||
|
etree.tostring(page, encoding="utf-8").decode("utf-8"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def update_localmenus(languages: list[str], pool: multiprocessing.Pool) -> None:
|
def update_localmenus(languages: list[str], pool: multiprocessing.Pool) -> None:
|
||||||
|
@ -127,7 +127,7 @@ def _check_xmllist_deps(file: Path) -> None:
|
|||||||
xmls = set()
|
xmls = set()
|
||||||
with file.open(mode="r") as fileobj:
|
with file.open(mode="r") as fileobj:
|
||||||
for line in fileobj:
|
for line in fileobj:
|
||||||
for newfile in Path("").glob(line + ".??.xml"):
|
for newfile in Path("").glob(line.strip() + ".??.xml"):
|
||||||
xmls.add(newfile)
|
xmls.add(newfile)
|
||||||
touch_if_newer_dep(file, list(xmls))
|
touch_if_newer_dep(file, list(xmls))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user