Fixed unit tests that fail because of the new error IDs.

This commit is contained in:
Matt Basta 2010-07-30 17:44:18 -07:00
Родитель 1b7c366a99
Коммит d896f44721
2 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -77,20 +77,21 @@ class ErrorBundle(object):
message["uid"] = uid
stack.append(message)
tree = self.message_tree
last_id = None
for eid in message["id"]:
if last_id is not None:
tree = tree[last_id]
if eid not in tree:
tree[eid] = {"__errors": 0,
"__warnings": 0,
"__infos": 0,
"__messages": []}
tree[eid]["__%s" % type_] += 1
last_id = eid
if message["id"]:
tree = self.message_tree
last_id = None
for eid in message["id"]:
if last_id is not None:
tree = tree[last_id]
if eid not in tree:
tree[eid] = {"__errors": 0,
"__warnings": 0,
"__infos": 0,
"__messages": []}
tree[eid]["__%s" % type_] += 1
last_id = eid
tree[last_id]['__messages'].append(uid)
tree[last_id]['__messages'].append(uid)
def set_type(self, type_):
"Stores the type of addon we're scanning"

Просмотреть файл

@ -24,7 +24,6 @@ class RDFParser(object):
try:
graph.parse(pseudo_file, format="xml")
except Exception as error:
print "There was an error parsing an RDF file."
self.rdf = None
return
else: