diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | klippy/klippy.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index dcee6cb0..163fc3cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ Most changes are breaking. option can be used to change the location. * The makefiles in `klippy/chelper` and `lib/hub-ctrl` are now used to build he respective `c_helper.so` and `hub-ctrl`. +* The config positional argument is now optional and defaults to + `/etc/klipper.cfg` ### Removed diff --git a/klippy/klippy.py b/klippy/klippy.py index 83a962fa..0cdb408f 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -340,10 +340,10 @@ def main(): options, args = opts.parse_args() if options.import_test: import_test() - if len(args) != 1: + if len(args) > 1: opts.error("Incorrect number of arguments") start_args = { - "config_file": args[0], + "config_file": args[0] if len(args) >= 1 else "/etc/klipper.cfg", "apiserver": options.apiserver, "start_reason": "startup", } |