if type('asd') == str:
pass
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/restricted.py", line 188, in
restricted
exec ccode in environment
File "/home/www-data/web2py/applications/rushops/controllers/
shop.py", line 376, in <module>
File "/home/www-data/web2py/gluon/globals.py", line 95, in <lambda>
self._caller = lambda f: f()
File "/home/www-data/web2py/gluon/tools.py", line 2314, in f
return action(*a, **b)
File "/home/www-data/web2py/applications/rushops/controllers/
shop.py", line 203, in structure
if type('asd') == str:
UnboundLocalError: local variable 'type' referenced before assignment
but in the other function:
ids = request.vars.filetodelete
if type(ids) != list and ids:
ids = [ids]
works fine