feat: Add session bus option for local testing and development
Introduced a `--use-session-bus` flag to optionally use the D-Bus session bus instead of the system bus. This allows better flexibility for local testing and development scenarios without requiring system-level changes. Updated related classes and functions to respect the new flag.
This commit is contained in:
@@ -9,7 +9,7 @@ __version__ = "1.4.0"
|
||||
|
||||
import logging
|
||||
import sys
|
||||
from argparse import ArgumentParser, Namespace
|
||||
from argparse import ArgumentParser, Namespace, SUPPRESS
|
||||
from configparser import ConfigParser
|
||||
from enum import Enum
|
||||
from os import R_OK, W_OK, access, environ, getpid, remove
|
||||
@@ -262,6 +262,16 @@ parser = ArgumentParser(
|
||||
prog=programname,
|
||||
description="Program description",
|
||||
)
|
||||
|
||||
# Use session bus of D-Bus for local testing and development proposes (hidden)
|
||||
parser.add_argument(
|
||||
"--use-session-bus",
|
||||
dest="use_session_bus",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help=SUPPRESS,
|
||||
)
|
||||
|
||||
parser.add_argument("--version", action="version", version=f"%(prog)s {program_version}")
|
||||
parser.add_argument(
|
||||
"-f",
|
||||
|
||||
Reference in New Issue
Block a user