Public bug reported:
Hi,
In /usr/share/doc/python-xkit/examples I find examples about how to use
xkit. It says the following:
'''Get the position of the Device section identified as 'Configured Video
Device''''
print 'Position of "Configured Video Device" =', a.getIdentifier('Device',
'Configured Video Device')
So I do:
>>> from XKit import xorgparser
>>> from XKit.xorgparser import *
>>> import sys
>>> import os
>>> destination = os.path.join(os.path.expanduser('~'), 'xorgnew.txt')
>>> source = '/etc/X11/xorg.conf'
>>> a = Parser(source)
>>> a.getIdentifier('Device', 'Radeon HD 3870')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/dist-packages/XKit/xorgparser.py", line 1157, in
getIdentifier
errorMsg = 'No identifier can be found for section "%s" No %d' %(section,
position)
TypeError: %d format: a number is required, not str
Still:
>>> a.getIdentifier('Device', 0)
'Radeon HD 3870'
Is the example wrong or is it a bug?
** Affects: x-kit (Ubuntu)
Importance: Undecided
Status: New
--
xkit exit with TypeError
https://bugs.launchpad.net/bugs/366624
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs