Error in _getFunction()
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-
6 if func.startswith
7 print func
----> 8 setattr(olDa, func, getattr(lib, func))
C:\Users\
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\
100
101 if name not in self._objs_[typ]:
--> 102 self._objs_
103
104 return self._objs_
C:\Users\
121 return self._defs_[typ][n]
122 elif typ == 'functions':
--> 123 return self._getFuncti
124 elif typ == 'types':
125 obj = self._defs_[typ][n]
C:\Users\
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_
UnboundLocalError: local variable 'func' referenced before assignment