issue59

Richard Hendershot rshendershot at mchsi.com
Fri Apr 7 09:28:40 PDT 2006


I modified parse() to disallow unicode and it appears to work.  I don't
know enough about this to be certain.  Can someone on the dev team
please examine this change?

---
    def parse(self):
        parser = expat.ParserCreate(namespace_separator=" ")
        parser.StartElementHandler = self.startElement
        parser.EndElementHandler = self.endElement
        parser.CharacterDataHandler = self.charData
        parser.returns_unicode = False


On Fri, 2006-04-07 at 10:57 -0500, Richard Hendershot wrote:
> I'm getting this same problem with the go-mono repo.  Is there any
> alternative type that would work?
> 
> 
> ---
> smart stats
> Loading cache...
> Traceback (most recent call last):
> ###############################################
> ( 68%)
>   File "/usr/bin/smart", line 194, in ?
>     main(sys.argv[1:])
>   File "/usr/bin/smart", line 167, in main
>     exitcode = iface.run(opts.command, opts.argv)
>   File "/usr/lib/python2.4/site-packages/smart/interface.py", line 53,
> in run
>     result = _command.main(self._ctrl, opts)
>   File "/usr/lib/python2.4/site-packages/smart/commands/stats.py", line
> 48, in main
>     ctrl.reloadChannels()
>   File "/usr/lib/python2.4/site-packages/smart/control.py", line 375, in
> reloadChannels
>     self._cache.load()
>   File
> "/usr/lib/python2.4/site-packages/smart/backends/rpm/redcarpet.py", line
> 91, in load
>     XMLParser(self).parse()
>   File
> "/usr/lib/python2.4/site-packages/smart/backends/rpm/redcarpet.py", line
> 305, in parse
>     parser.ParseFile(open(self._loader._filename))
>   File
> "/usr/lib/python2.4/site-packages/smart/backends/rpm/redcarpet.py", line
> 175, in endElement
>     handler(name, attrs, self._data)
>   File
> "/usr/lib/python2.4/site-packages/smart/backends/rpm/redcarpet.py", line
> 275, in handlePackageEnd
>     prvargs, reqargs, upgargs, cnfargs)
> TypeError: argument 1 must be str, not unicode
> [

-- 
Richard Hendershot <rshendershot at mchsi.com>




More information about the Smart mailing list