Skip to content

Commit

Permalink
usbsdmux: remove the deprecated service/client code paths
Browse files Browse the repository at this point in the history
The client/server model of operation has been deprecated with version 0.2.0,
released more than three years ago.
We should be able to remove the backwards-compatibility stubs now.

Signed-off-by: Leonard Göhrs <[email protected]>
  • Loading branch information
hnez committed May 8, 2024
1 parent 51d9421 commit f0c9472
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 58 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ documentation="https://www.linux-automation.com/usbsdmux-M01/"
[project.scripts]
usbsdmux = "usbsdmux.__main__:main"
usbsdmux-configure = "usbsdmux.usb2642eeprom:main"
usbsdmux-service = "usbsdmux.service:main"

[tool.setuptools]
packages = [
Expand Down
18 changes: 0 additions & 18 deletions usbsdmux/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,8 @@ def main():

subparsers.add_parser("info", help="Show information about the SD card")

# These arguments were previously used for the client/service
# based method to grant USB-SD-Mux access to non-root users.
# The client/service model is no longer needed due to new udev
# rules and a change to how the /dev/sg* devices are accessed.
# Display a warning but do not fail when these are used so
# existing scripts do not break and can be upgraded gracefully.
parser.add_argument("-d", "--direct", help=argparse.SUPPRESS, action="store_true", default=None)
parser.add_argument("-c", "--client", help=argparse.SUPPRESS, action="store_true", default=None)
parser.add_argument("-s", "--socket", help=argparse.SUPPRESS, default=None)

args = parser.parse_args()

if any(arg is not None for arg in (args.direct, args.client, args.socket)):
print(
"usbsdmux: usage of -s/-c/-d arguments is deprecated "
"as the service/client split is no longer required. "
"Please upgrade your scripts to not supply either of these arguments",
file=sys.stderr,
)

config = Config(args.config)

try:
Expand Down
39 changes: 0 additions & 39 deletions usbsdmux/service.py

This file was deleted.

0 comments on commit f0c9472

Please sign in to comment.