Skip to content

Commit cff80ee

Browse files
committed
fix bug in kwargs handling for append
1 parent 753c0c5 commit cff80ee

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/pynxtools/dataconverter/convert.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import sys
2727
from gettext import gettext
2828
from pathlib import Path
29-
from typing import Literal, Optional
29+
from typing import Literal
3030

3131
import click
3232
import lxml.etree as ET
@@ -158,6 +158,12 @@ def transfer_data_into_template(
158158
else:
159159
fail = False
160160

161+
if "append" in kwargs:
162+
append = kwargs["append"]
163+
del kwargs["append"]
164+
else:
165+
append = False
166+
161167
data = data_reader().read( # type: ignore[operator]
162168
template=Template(template), file_paths=input_file, **kwargs
163169
)

0 commit comments

Comments
 (0)