Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usbsdmux: remove the deprecated service/client code paths #78

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.