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

Timeout argument doesn't take string #2

Open
benhocker opened this issue Dec 7, 2015 · 2 comments
Open

Timeout argument doesn't take string #2

benhocker opened this issue Dec 7, 2015 · 2 comments

Comments

@benhocker
Copy link

I'm probably doing something wrong but I was getting the below error when I used the timeout argument.


Traceback (most recent call last):
  File "./check_snmp_extend.py", line 497, in 
    main()
  File "./check_snmp_extend.py", line 449, in main
    do_the_main_stuff()
  File "./check_snmp_extend.py", line 87, in f2
    signal.alarm(options.timeout) # triger alarm in timeout_time seconds

I just added an int() around it and it seemed to work after that:

signal.alarm(int(options.timeout)) # triger alarm in timeout_time seconds
@severinsimko
Copy link

I have exactly same problem, how did you fix it ?

@benhocker
Copy link
Author

It looks like i just forced the options.timeout to an integer on this line:

from:

signal.alarm(options.timeout) # triger alarm in timeout_time seconds

to:

signal.alarm(int(options.timeout)) # triger alarm in timeout_time seconds 

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

2 participants