Skip to content

Commit

Permalink
Use same configuration file as Linux on macOS (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreluctg authored Sep 8, 2023
1 parent 1774051 commit 4b17b9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion can/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

CONFIG_FILES = ["~/can.conf"]

if platform.system() == "Linux":
if platform.system() in ("Linux", "Darwin"):
CONFIG_FILES.extend(["/etc/can.conf", "~/.can", "~/.canrc"])
elif platform.system() == "Windows" or platform.python_implementation() == "IronPython":
CONFIG_FILES.extend(["can.ini", os.path.join(os.getenv("APPDATA", ""), "can.ini")])
Expand Down
4 changes: 2 additions & 2 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can also specify the interface and channel for each Bus instance::
Configuration File
------------------

On Linux systems the config file is searched in the following paths:
On Linux and macOS systems the config file is searched in the following paths:

#. ``~/can.conf``
#. ``/etc/can.conf``
Expand Down Expand Up @@ -159,4 +159,4 @@ Lookup table of interface names:
| ``"virtual"`` | :doc:`interfaces/virtual` |
+---------------------+-------------------------------------+

Additional interface types can be added via the :ref:`plugin interface`.
Additional interface types can be added via the :ref:`plugin interface`.

0 comments on commit 4b17b9c

Please sign in to comment.