diff --git a/src/sphinx_autobuild/cli.py b/src/sphinx_autobuild/cli.py index 3ec427f..8f4bad3 100644 --- a/src/sphinx_autobuild/cli.py +++ b/src/sphinx_autobuild/cli.py @@ -17,9 +17,10 @@ def _get_build_args(args): build_args = [] + arg_dict = vars(args) # Convert the args namespace to a dictionary for arg, meta in SPHINX_BUILD_OPTIONS: - val = getattr(args, arg) - if not val: + val = arg_dict.get(arg) + if val is None: continue opt = f"-{arg}" if meta is None: