Advertisement
Guest User

Untitled

a guest
Jan 16th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. Working directory: /opt/noc
  2. <type 'exceptions.TypeError'>
  3. string indices must be integers, not str
  4. START OF TRACEBACK
  5. ------------------------------------------------------------------------
  6. File: /opt/noc/inv/discovery/jobs/rep_discovery.py (Line: 34)
  7. Function: process_result
  8. 27 def process_result(self, object, result):
  9. 28 first_mac, last_mac = self.get_object_macs(object)
  10. 29 if not first_mac or not last_mac:
  11. 30 return # ID discovery is incomplete
  12. 31 for segment in result:
  13. 32 # Find own ports
  14. 33 o = [i for i, p in enumerate(segment)
  15. 34 ==> if first_mac <= p["mac"] <= last_mac]
  16. 35 if not o:
  17. 36 continue # Not found
  18. 37 elif len(o) == 2:
  19. 38 # Inside the ring
  20. 39 self.submit_pair(object,
  21. 40 segment[o[0]], segment[o[0] - 1])
  22. Variables:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement