diff --git a/can/util.py b/can/util.py index 59abdd579..71980e82f 100644 --- a/can/util.py +++ b/can/util.py @@ -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")]) diff --git a/doc/configuration.rst b/doc/configuration.rst index 494351350..7b42017a9 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -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`` @@ -159,4 +159,4 @@ Lookup table of interface names: | ``"virtual"`` | :doc:`interfaces/virtual` | +---------------------+-------------------------------------+ -Additional interface types can be added via the :ref:`plugin interface`. \ No newline at end of file +Additional interface types can be added via the :ref:`plugin interface`.