Message93858
When ran in python 3.1.1 (hand compiled, fedora 11), the first example
of configparser module fail with :
Traceback (most recent call last):
File "test1.py", line 22, in <module>
config.write(configfile)
File "/usr/local/lib/python3.1/configparser.py", line 394, in write
fp.write("[%s]\n" % section)
TypeError: write() argument 1 must be bytes or buffer, not str
This can be solved by replacing :
with open('example.cfg', 'wb') as configfile:
by :
with open('example.cfg', 'w') as configfile:
Patch attached.
Cheer !
Thomas |
|
Date |
User |
Action |
Args |
2009-10-11 13:09:36 | tcourbon | set | recipients:
+ tcourbon, georg.brandl |
2009-10-11 13:09:35 | tcourbon | set | messageid: <1255266575.87.0.417277827864.issue7103@psf.upfronthosting.co.za> |
2009-10-11 13:09:34 | tcourbon | link | issue7103 messages |
2009-10-11 13:09:33 | tcourbon | create | |
|