Skip to content

Commit 4b17b9c

Browse files
authored
Use same configuration file as Linux on macOS (#1657)
1 parent 1774051 commit 4b17b9c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

can/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
CONFIG_FILES = ["~/can.conf"]
4545

46-
if platform.system() == "Linux":
46+
if platform.system() in ("Linux", "Darwin"):
4747
CONFIG_FILES.extend(["/etc/can.conf", "~/.can", "~/.canrc"])
4848
elif platform.system() == "Windows" or platform.python_implementation() == "IronPython":
4949
CONFIG_FILES.extend(["can.ini", os.path.join(os.getenv("APPDATA", ""), "can.ini")])

doc/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can also specify the interface and channel for each Bus instance::
3636
Configuration File
3737
------------------
3838

39-
On Linux systems the config file is searched in the following paths:
39+
On Linux and macOS systems the config file is searched in the following paths:
4040

4141
#. ``~/can.conf``
4242
#. ``/etc/can.conf``
@@ -159,4 +159,4 @@ Lookup table of interface names:
159159
| ``"virtual"`` | :doc:`interfaces/virtual` |
160160
+---------------------+-------------------------------------+
161161

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

0 commit comments

Comments
 (0)