|
|
|
@ -23,7 +23,7 @@ import datetime
|
|
|
|
|
import functools
|
|
|
|
|
import bz2
|
|
|
|
|
|
|
|
|
|
from ..cl_xml import ET
|
|
|
|
|
from ..cl_xml import ET, str_to_xml_doc
|
|
|
|
|
import pexpect
|
|
|
|
|
from ..configparser import ConfigParser
|
|
|
|
|
|
|
|
|
@ -689,7 +689,7 @@ class PackageInformation:
|
|
|
|
|
output = pexpect.spawn(self.eix_cmd, ["--xml", pkg_list],
|
|
|
|
|
timeout=60).read()
|
|
|
|
|
except pexpect.TIMEOUT:
|
|
|
|
|
output = ""
|
|
|
|
|
output = b""
|
|
|
|
|
re_cut = re.compile(b"^.*?(?=<\?xml version)", re.S)
|
|
|
|
|
with ignore(ET.ParseError):
|
|
|
|
|
xml = ET.fromstring(re_cut.sub(b'', output))
|
|
|
|
@ -891,7 +891,7 @@ class EixParser():
|
|
|
|
|
"""
|
|
|
|
|
def parseXml(self, buffer):
|
|
|
|
|
try:
|
|
|
|
|
eix_xml = ET.fromstring(buffer)
|
|
|
|
|
eix_xml = str_to_xml_doc(buffer)
|
|
|
|
|
return self.get_categories(eix_xml)
|
|
|
|
|
except ET.ParseError:
|
|
|
|
|
return iter(())
|
|
|
|
|