Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Jun 27, 2023
1 parent 856a2d8 commit 7598339
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tests
on: [push, pull_request]

env:
RUN: docker run -v $GITHUB_WORKSPACE:/project/opendbc -w /project/opendbc -e PYTHONWARNINGS=error --shm-size 1G --rm opendbc /bin/bash -c
RUN: docker run -v $GITHUB_WORKSPACE:/project/opendbc -w /project/opendbc -e PYTHONWARNINGS="error,default::DeprecationWarning" --shm-size 1G --rm opendbc /bin/bash -c
BUILD: |
docker pull $(grep -ioP '(?<=^from)\s+\S+' Dockerfile) || true
docker pull ghcr.io/commaai/opendbc:latest || true
Expand Down
2 changes: 1 addition & 1 deletion generator/chrysler/_stellantis_common_ram.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
chrysler_path = os.path.dirname(os.path.realpath(__file__))

for out, addr_lookup in chrysler_to_ram.items():
with open(os.path.join(chrysler_path, src)) as in_f, open(os.path.join(chrysler_path, out), 'w') as out_f:
with open(os.path.join(chrysler_path, src), encoding='utf-8') as in_f, open(os.path.join(chrysler_path, out), 'w', encoding='utf-8') as out_f:
out_f.write(f'CM_ "Generated from {src}"\n\n')

wrote_addrs = set()
Expand Down
4 changes: 2 additions & 2 deletions generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def read_dbc(src_dir: str, filename: str) -> str:
with open(os.path.join(src_dir, filename)) as file_in:
with open(os.path.join(src_dir, filename), encoding='utf-8') as file_in:
return file_in.read()


Expand All @@ -23,7 +23,7 @@ def create_dbc(src_dir: str, filename: str, output_path: str):
output_filename = filename.replace('.dbc', generated_suffix)
output_file_location = os.path.join(output_path, output_filename)

with open(output_file_location, 'w') as dbc_file_out:
with open(output_file_location, 'w', encoding='utf-8') as dbc_file_out:
dbc_file_out.write('CM_ "AUTOGENERATED FILE, DO NOT EDIT";\n')

for include_filename in includes:
Expand Down
2 changes: 1 addition & 1 deletion generator/hyundai/hyundai_kia_mando_corner_radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if __name__ == "__main__":
dbc_name = os.path.basename(__file__).replace(".py", ".dbc")
hyundai_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(hyundai_path, dbc_name), "w") as f:
with open(os.path.join(hyundai_path, dbc_name), "w", encoding='utf-8') as f:
f.write("""
VERSION ""
Expand Down
2 changes: 1 addition & 1 deletion generator/hyundai/hyundai_kia_mando_front_radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if __name__ == "__main__":
dbc_name = os.path.basename(__file__).replace(".py", ".dbc")
hyundai_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(hyundai_path, dbc_name), "w") as f:
with open(os.path.join(hyundai_path, dbc_name), "w", encoding='utf-8') as f:
f.write("""
VERSION ""
Expand Down

0 comments on commit 7598339

Please sign in to comment.