Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c88aa203 authored by Emmanuel Thomé's avatar Emmanuel Thomé
Browse files

try to fix #2

parent 93359f08
Branches master
No related tags found
No related merge requests found
......@@ -188,7 +188,11 @@ def get_all_messages_of_issue(issue_id, tree=None):
assert pieces[0].tag == 'span'
assert pieces[1].tag == 'p'
date=re.sub("^Date: ","",pieces[0].text)
sender=pieces[0].find("./a").text
su = pieces[0].find("./a")
if su is not None:
sender = su.text
else:
sender = "gforge_nobody"
text="\n".join(pieces[1].itertext())
mh={ 'date':date,
'sender':sender,
......@@ -235,7 +239,11 @@ def extract_more_fields_from_detail_page(issue, tree):
row3=root.findall(".//form[@id=\"trackerdetailform\"]/table/tr[3]/td")
if not row3:
raise RuntimeError("Cannot get submitter for gforge issue id {}".format(issue['artifact_id']))
issue['submitter_unixname'] = row3[0].find("./samp/a").text
su = row3[0].find("./samp/a")
if su is not None:
issue['submitter_unixname'] = su.text
else:
issue['submitter_unixname'] = "gforge_nobody"
foo=re.search("\((\w+)\)",str(etree.tostring(row3[1])))
if foo:
issue['assigned_to_unixname'] = foo.group(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment