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

Make argument handling more robust #2

Open
tbm opened this issue Aug 21, 2023 · 1 comment
Open

Make argument handling more robust #2

tbm opened this issue Aug 21, 2023 · 1 comment

Comments

@tbm
Copy link

tbm commented Aug 21, 2023

./tp357tool.py
Traceback (most recent call last):
  File "/home/tbm/src/tp357/./tp357tool.py", line 139, in <module>
    device, read, write = bt_setup(sys.argv[1])
                                   ~~~~~~~~^^^
IndexError: list index out of range

It would be nice to show a help/usage message instead of a backtrace.

@tbm tbm changed the title No args should give help message Make argument handling more robust Aug 21, 2023
@tbm
Copy link
Author

tbm commented Aug 21, 2023

It thinks --help is the address.

./tp357tool.py --help                                                                                         main

(process:724756): GLib-GIO-CRITICAL **: 11:09:56.167: g_dbus_connection_call_sync_internal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed

(process:724756): GLib-GIO-CRITICAL **: 11:10:01.179: g_dbus_connection_call_sync_internal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed
Waiting for device... 1/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant