Error in _getFunction()

Bug #1030687 reported by Daverz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyclibrary
New
Undecided
Unassigned

Bug Description

Minor error in a try/except block: using func instead of funcName.

UnboundLocalError Traceback (most recent call last)
<ipython-input-197-e6cd511eb963> in <module>()
      6 if func.startswith('ol') and 'Teds' not in func:
      7 print func
----> 8 setattr(olDa, func, getattr(lib, func))

C:\Users\dmcook\Documents\VBridge\pyclibrary\CLibrary.pyc in __getattr__(self, name)
    157 for n in names:
    158 if n in self._defs_[k]:
--> 159 obj = self(k, n)
    160 break
    161 if obj is not None:

C:\Users\dmcook\Documents\VBridge\pyclibrary\CLibrary.pyc in __call__(self, typ, name)
    100
    101 if name not in self._objs_[typ]:
--> 102 self._objs_[typ][name] = self._mkObj_(typ, name)
    103
    104 return self._objs_[typ][name]

C:\Users\dmcook\Documents\VBridge\pyclibrary\CLibrary.pyc in _mkObj_(self, typ, name)
    121 return self._defs_[typ][n]
    122 elif typ == 'functions':
--> 123 return self._getFunction(n)
    124 elif typ == 'types':
    125 obj = self._defs_[typ][n]

C:\Users\dmcook\Documents\VBridge\pyclibrary\CLibrary.pyc in _getFunction(self, funcName)
    175 func = getattr(self._lib_, funcName)
    176 except:
--> 177 raise Exception("Function name '%s' appears in headers but not in library!" % func)
    178
    179 #print "create function %s," % (funcName), self._defs_['functions'][funcName]

UnboundLocalError: local variable 'func' referenced before assignment

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.