ipdevpoll: local variable 'obj_model' referenced before assignment

Bug #674433 reported by Morten Brekkevold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
Morten Brekkevold

Bug Description

some collection runs keep crashing with the error message: exceptions.UnboundLocalError: local variable 'obj_model' referenced before assignment. This more or less masks the real problem, since this bug is inside an exception handler.

Full traceback here:
2010-11-12 11:08:58,348 [ERROR] [nav.ipdevpoll.jobs.jobhandler.inventory.(example-sw.example.org)] Save stage failed with unhandled error:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.5/site-packages/twisted/python/threadpool.py", line 161, in _worker
    context.call(ctx, function, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.5/site-packages/twisted/internet/threads.py", line 24, in _putResultInDeferred
    result = f(*args, **kwargs)
  File "/var/lib/python-support/python2.5/nav/ipdevpoll/utils.py", line 180, in _autocommit
    result = func(*args, **kw)
  File "/var/lib/python-support/python2.5/nav/ipdevpoll/utils.py", line 199, in _cleanup
    return func(*args, **kwargs)
  File "/var/lib/python-support/python2.5/nav/ipdevpoll/jobs.py", line 272, in complete_save_cycle
    result = self.perform_save()
  File "/var/lib/python-support/python2.5/nav/ipdevpoll/jobs.py", line 354, in perform_save
    obj, obj_model)
exceptions.UnboundLocalError: local variable 'obj_model' referenced before assignment

Tags: ipdevpoll
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

fix here: http://metanav.uninett.no/hg/series/3.6.x/rev/b9e95f7b16ef
also merged to 3.7.x and default.

Changed in nav:
status: Confirmed → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.