Advertisement
Guest User

Untitled

a guest
Sep 6th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.32 KB | None | 0 0
  1. ERROR:noc.lib.debug:UNHANDLED EXCEPTION (2014-09-06 10:13:42.714559)
  2. Working directory: /opt/noc
  3. <type 'exceptions.KeyError'>
  4. 'unique_indexes'
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/lib/collection.py (Line: 50)
  8. Function: __init__
  9. 43 self.ref_cache = {}
  10. 44 self.partial = set()
  11. 45 if hasattr(self.doc, "name"):
  12. 46 # Use .name field when present
  13. 47 self.get_name = attrgetter("name")
  14. 48 else:
  15. 49 # Or first unique field otherwise
  16. 50 ==> self.get_name = attrgetter(self.doc._meta["unique_indexes"][0][0][0])
  17. 51
  18. 52 def log(self, msg):
  19. 53 print msg
  20. 54
  21. 55 def die(self, msg):
  22. 56 raise ValueError(msg)
  23. Variables:
  24. c = 'oidaliases'
  25. name = 'fm.oidaliases'
  26. doc = <class 'noc.fm.models.oidalias.OIDAlias'>
  27. self = <noc.lib.collection.Collection object at 0x80f50eb50>
  28. m = 'fm'
  29. local = True
  30. ------------------------------------------------------------------------
  31. File: /opt/noc/main/management/commands/collection.py (Line: 171)
  32. Function: handle_sync
  33. 164 return d
  34. 165 raise CommandError(self.not_found(name))
  35. 166
  36. 167 def handle_sync(self):
  37. 168 DocCategory.fix_all()
  38. 169 try:
  39. 170 for name, doc in self.collections:
  40. 171 ==> lc = Collection(name, doc, local=True)
  41. 172 lc.load()
  42. 173 dc = Collection(name, doc)
  43. 174 dc.load()
  44. 175 lc.apply(dc)
  45. 176 except ValueError, why:
  46. 177 raise CommandError(why)
  47. Variables:
  48. doc = <class 'noc.fm.models.oidalias.OIDAlias'>
  49. self = <noc.main.management.commands.collection.Command object at 0x80f1a1d90>
  50. dc = <noc.lib.collection.Collection object at 0x80f4e71d0>
  51. name = 'fm.oidaliases'
  52. lc = <noc.lib.collection.Collection object at 0x80f3ca750>
  53. ------------------------------------------------------------------------
  54. File: /opt/noc/main/management/commands/collection.py (Line: 139)
  55. Function: _handle
  56. 132 raise
  57. 133 except:
  58. 134 error_report()
  59. 135
  60. 136 def _handle(self, *args, **options):
  61. 137 self.verbose = bool(options.get("verbosity"))
  62. 138 if options["cmd"] == "sync":
  63. 139 ==> return self.handle_sync()
  64. 140 elif options["cmd"] == "upgrade":
  65. 141 return self.handle_upgrade(args)
  66. 142 elif options["cmd"] == "install":
  67. 143 if len(args) < 2:
  68. 144 parts = args[0].split(os.path.sep)
  69. 145 if (len(parts) < 2 or parts[1] != "collections"):
  70. Variables:
  71. self = <noc.main.management.commands.collection.Command object at 0x80f1a1d90>
  72. args = ()
  73. options =
  74. {'cmd': 'sync',
  75. 'pythonpath': None,
  76. 'settings': None,
  77. 'traceback': None,
  78. 'verbosity': '1'}
  79. ------------------------------------------------------------------------
  80. File: /opt/noc/main/management/commands/collection.py (Line: 130)
  81. Function: handle
  82. 123 msg = "%s\nAvailable collections:" % msg
  83. 124 for n, d in self.collections:
  84. 125 msg = "%s\n %s" % (msg, n)
  85. 126 return msg
  86. 127
  87. 128 def handle(self, *args, **kwargs):
  88. 129 try:
  89. 130 ==> self._handle(*args, **kwargs)
  90. 131 except CommandError:
  91. 132 raise
  92. 133 except:
  93. 134 error_report()
  94. 135
  95. 136 def _handle(self, *args, **options):
  96. Variables:
  97. self = <noc.main.management.commands.collection.Command object at 0x80f1a1d90>
  98. args = ()
  99. kwargs =
  100. {'cmd': 'sync',
  101. 'pythonpath': None,
  102. 'settings': None,
  103. 'traceback': None,
  104. 'verbosity': '1'}
  105. ------------------------------------------------------------------------
  106. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement