Skip to content

Commit

Permalink
Merge pull request #133 from Zharktas/fix_using_iconv_on_alpine
Browse files Browse the repository at this point in the history
Fix using iconv on alpine
  • Loading branch information
jqnatividad authored Jun 11, 2024
2 parents e86ebf5 + 90325a4 commit baadeea
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions datapusher/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,19 +688,19 @@ def _push_to_datastore(task_id, input, dry_run=False, temp_dir=None):
file_encoding.stdout)
)
try:
subprocess.run(
[
"iconv",
"-f",
file_encoding.stdout,
"-t",
"UTF-8",
tmp,
"--output",
qsv_input_utf_8_encoded_csv,
],
check=True,
)
with open(qsv_input_utf_8_encoded_csv, 'w') as fd:
subprocess.run(
[
"iconv",
"-f",
file_encoding.stdout,
"-t",
"UTF-8",
tmp,
],
check=True,
stdout=fd
)
except subprocess.CalledProcessError as e:
# return as we can't push a non UTF-8 CSV
logger.error(
Expand Down

0 comments on commit baadeea

Please sign in to comment.