lspci args parser issue #18

Closed
opened 2020-11-29 12:49:34 +00:00 by noasoffer · 4 comments
noasoffer commented 2020-11-29 12:49:34 +00:00 (Migrated from gitlab.com)

when I'm fallowing your documentation example with verbose=True I'm having the following issue:

usage: main.py [-h] [-r [REVISION]] [-p [PROGIF]]
slot cls vendor device subsystem_vendor subsystem_device
main.py: error: argument slot: invalid Slot value: 'Slot:'

example:
from pylspci.command
from pylspci import parser
parser.run(verbose=True,hide_single_domain=False, id_resolve_option=IDResolveOption.NameOnly,)

when I'm fallowing your documentation example with verbose=True I'm having the following issue: usage: main.py [-h] [-r [REVISION]] [-p [PROGIF]] slot cls vendor device subsystem_vendor subsystem_device main.py: error: argument slot: invalid Slot value: 'Slot:' example: from pylspci.command from pylspci import parser parser.run(verbose=True,hide_single_domain=False, id_resolve_option=IDResolveOption.NameOnly,)
Lucidiot commented 2020-11-29 18:42:00 +00:00 (Migrated from gitlab.com)

assigned to @Lucidiot

assigned to @Lucidiot
Lucidiot commented 2020-11-29 18:47:32 +00:00 (Migrated from gitlab.com)

mentioned in merge request !12

mentioned in merge request !12
Lucidiot commented 2020-11-29 18:52:00 +00:00 (Migrated from gitlab.com)

Thanks for reporting!

It seems this was a mistake in the docs themselves, so I updated them. GitLab Pages is deploying the new docs and they should be up to date on https://lucidiot.gitlab.io/pylspci/ soon.

from pylspci import parser causes a SimpleParser to be imported, which is unable to use the verbose=True option. To use verbose mode, you need the VerboseParser, which will set verbose=True by default:

from pylspci.parsers import VerboseParser
from pylspci.command import IDResolveOption
VerboseParser().run(
    hide_single_domain=False,
    id_resolve_option=IDResolveOption.NameOnly,
)

I will be adding a new exception in !12 to give a more helpful error message next time, and will be releasing this as v0.3.3.

Thanks for reporting! It seems this was a mistake in the docs themselves, so I updated them. GitLab Pages is deploying the new docs and they should be up to date on https://lucidiot.gitlab.io/pylspci/ soon. `from pylspci import parser` causes a `SimpleParser` to be imported, which is unable to use the `verbose=True` option. To use verbose mode, you need the `VerboseParser`, which will set `verbose=True` by default: ```python from pylspci.parsers import VerboseParser from pylspci.command import IDResolveOption VerboseParser().run( hide_single_domain=False, id_resolve_option=IDResolveOption.NameOnly, ) ``` I will be adding a new exception in !12 to give a more helpful error message next time, and will be releasing this as v0.3.3.
Lucidiot commented 2020-11-29 18:52:50 +00:00 (Migrated from gitlab.com)

mentioned in commit 7da6c0756c

mentioned in commit 7da6c0756c732acd3bb341e3847a4e32b7294058
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lucidiot/pylspci#18
No description provided.