Skip to content

Commit 09d0ebe

Browse files
committed
fix: removing extra comas at the end of the command
1 parent c55ef28 commit 09d0ebe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pyconverter/xml2py/ast_tree.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,6 +2979,8 @@ def py_source(self, custom_functions=None, indent=""):
29792979
command += arg.py_arg_name
29802980
command += "}"
29812981
command += '"\n'
2982+
while command != command.replace(',"', '"'): # remove extra commas at the end of the command
2983+
command = command.replace(',"', '"')
29822984
# ",{" + "},{".join(self.arg_desc.py_arg_name) + '}"\n'
29832985
else:
29842986
command = 'command = f"' + self.name + '"\n'

0 commit comments

Comments
 (0)