parser.readfp(confpp_obj)
File "/usr/lib/python2.5/site-packages/iniparse/compat.py", line 106, in readfp
self.data.readfp(fp)
File "/usr/lib/python2.5/site-packages/iniparse/ini.py", line 563, in readfp
if line and line[-1]=='\n':
UnboundLocalError: local variable 'line' referenced before assignment
I have attached a patch to fix it, please check if it look ok, before i commit it.
Tim
Regarding the problem: How about just initializing 'line' to 'None'
before the loop?
Also, could you add a test to test_misc.py that checks that an empty
file is parsed and written out correctly?
Thanks,
-param
Tim
Tim