[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
pungi, python and the question: where are the python gurus?
- From: Oliver Falk <oliver linux-kernel at>
- To: Development discussions related to Fedora Core <fedora-devel-list redhat com>
- Subject: pungi, python and the question: where are the python gurus?
- Date: Tue, 02 Oct 2007 12:38:21 +0200
Hi!
It might be likely possible, that nobody using Fedora and using pungi
ever tried creating isos, is that right? I don't think so. But it might
likely be possible, that nobody ever tried to create non-DVD isos and
therefor nobody encountered the following problem:
[root gosa pungi]# sh ~/bin/run_pungi.sh
Traceback (most recent call last):
File "/usr/bin/pungi", line 178, in <module>
main()
File "/usr/bin/pungi", line 43, in main
config.set('default', 'cdsize', part.size)
File "/usr/lib/python2.5/ConfigParser.py", line 639, in set
raise TypeError("option values must be strings")
TypeError: option values must be strings
This came up after I enabled the following in my pungi (ks/kickstart)
config:
part iso --size=650
Well, no 650 is not a string (is it?), but for me option values in this
case are allowed to be instance of int as well and in any other case
that might be true also. Therefor my suggested patch attached; Simply
checks if option value is instance string OR int. And it also prints out
the value in case it's not a string/int, for easier debugging.
And before someone asks:
[oliver gosa devel]$ rpm -q pungi python
pungi-1.1.3-1.fc8
python-2.5.1-11.fc8
So please python geeks/gurus and/or python guys with good connections to
upstream python. Fix/nring it upstream. :-)
Thanks a lot for listening,
Oliver
--- /tmp/ConfigParser.py 2007-10-02 12:33:20.000000000 +0200
+++ /usr/lib/python2.5/ConfigParser.py 2007-10-02 12:27:27.000000000 +0200
@@ -635,6 +635,6 @@
def set(self, section, option, value):
"""Set an option. Extend ConfigParser.set: check for string values."""
- if not isinstance(value, basestring):
- raise TypeError("option values must be strings")
+ if not (isinstance(value, basestring) or isinstance(value, int)):
+ raise TypeError("option values must be strings (%s)" % (value))
ConfigParser.set(self, section, option, value)
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]