0

1) python newbie

2) tasked with getting a script together that would compile various stats from our brocade switches trying to run this script https://github.com/zapman449/brocade_switchshow_aliases

3) get it set up per the Readme. Config file is set up (I think) properly)

4) BUT - I get the following errors - and not sure why. Any help would be appreciated

   [someguy@myserver SAN_Scripts]$ ./get-brocade.py fcr_fd_41

    <function parse_switch_line at 0x1429578>

    Switch Username: someguy

    Switch password for user someguy:

    Traceback (most recent call last):

     File "./get-brocade.py", line 265, in <module>
        main()

    File "./get-brocade.py", line 261, in main
        get_switchshow(conn, switch)

    File "./get-brocade.py", line 198, in get_switchshow
        if len(words) == 3 :

    TypeError: object of type 'NoneType' has no len()
    Exception in thread Thread-1 (most likely raised during interpreter shutdown):

    Traceback (most recent call last):
      File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
      File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 1609, in run
    <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'
    [someguy@myserverSAN_Scripts]$
AMC
  • 2,642
  • 7
  • 13
  • 35
TK421
  • 1
  • 1
  • 1
    Looks like a pretty baren GitHub project... That code is 8 years old without any activity... Furthermore, that code is not python3 compatible... Are you sure you want to go down that specific rabbit hole? – James Powis Apr 14 '20 at 21:45
  • yeah - it is pretty old... – TK421 Apr 14 '20 at 22:47
  • At the heart of that code is paramiko... which is a very active project, and not very hard to roll your own solution if you cannot find a project that fits your needs. https://stackoverflow.com/questions/30603219/executing-command-using-paramiko-on-brocade-switch – James Powis Apr 14 '20 at 23:26

0 Answers0