Skip to content
New issue

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

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

Already on GitHub? # to your account

Parser Error when trying to set time using 's' option with time string #15

Open
rlphelps opened this issue Jun 16, 2020 · 2 comments
Open

Comments

@rlphelps
Copy link

rlphelps commented Jun 16, 2020

I would like to set time and date on a piece of hardware and can successfully set the date as follows.

snmpset.py -v2c -c private 192.168.1.11 .1.3.6.1.4.1.3808.2.1.5.1.0 s 06\15\2020

However the following results in an error: Command-line parser error at token semicolon
snmpset.py -v2c -c private 192.168.1.11 .1.3.6.1.4.1.3808.2.1.5.2.0 s 12:20:20

I believe the ':'s are the cause and not a semicolon. How can I use snmpset.py to set the time?

@andywis
Copy link

andywis commented Nov 27, 2020

We have a similar problem that a semicolon in a community string in the command line args triggers an error

@andywis
Copy link

andywis commented Nov 27, 2020

@rlphelps - part of the issue here is that ":" is called "semicolon" instead of "colon" in the source code.
See https://github.com/etingof/snmpclitools/blob/master/snmpclitools/cli/base.py#L108
The character in question is stored in the docstring, and is given the name "semicolon" on the next line.

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

No branches or pull requests

2 participants