Skip to content

Commit

Permalink
[FIX] l10n_es_aeat: ljust exige byte string de lenght 1
Browse files Browse the repository at this point in the history
  • Loading branch information
agaldona authored and AaronHForgeFlow committed Feb 20, 2025
1 parent e7bf1f0 commit 996a304
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions l10n_es_aeat/wizard/export_to_boe.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ def _format_string(self, text, length, fill=' ', align='<'):
if len(ascii_string) > length:
ascii_string = ascii_string[:length]
# Format the string
ascii_fill = fill.encode('iso-8859-1')
if align == '<':
ascii_string = ascii_string.ljust(length, fill)
ascii_string = ascii_string.ljust(length, ascii_fill)
elif align == '>':
ascii_string = ascii_string.rjust(length, fill)
ascii_string = ascii_string.rjust(length, ascii_fill)
else:
assert False, _('Wrong aling option. It should be < or >')
# Sanity-check
Expand Down

0 comments on commit 996a304

Please sign in to comment.