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

missing .tackf file should print out a helpful message instead of an exception #144

Closed
jathanism opened this Issue Nov 1, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@jathanism
Member

jathanism commented Nov 1, 2013

This is what currently happens:

Traceback (most recent call last):
  File "/opt/bin/gong", line 80, in <module>
    sys.exit(main())
  File "/opt/bin/gong", line 74, in main
    retval = dev.connect()
  File "/opt/lib/python2.7/site-packages/trigger/twister.py", line 241, in connect
    init_commands=init_commands)
  File "/opt/lib/python2.7/site-packages/trigger/twister.py", line 167, in pty_connect
    init_commands)
  File "/opt/lib/python2.7/site-packages/trigger/twister.py", line 694, in __init__
    TriggerClientFactory.__init__(self, deferred, creds, init_commands)
  File "/opt/lib/python2.7/site-packages/trigger/twister.py", line 587, in __init__
    self.creds = tacacsrc.validate_credentials(creds)
  File "/opt/lib/python2.7/site-packages/trigger/tacacsrc.py", line 155, in validate_credentials
    tcrc = Tacacsrc()
  File "/opt/lib/python2.7/site-packages/trigger/tacacsrc.py", line 276, in __init__
    self.key = self._get_key_old(settings.TACACSRC_KEYFILE)
  File "/opt/lib/python2.7/site-packages/trigger/tacacsrc.py", line 298, in _get_key_old
    if key[-1].isspace():
IndexError: string index out of range
@jathanism

This comment has been minimized.

Member

jathanism commented Dec 3, 2014

This also occurs if .tackf is found but is empty.

@jathanism jathanism closed this in b084435 Dec 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment