handle file adds and removed values
This commit is contained in:
parent
61f28ad4ac
commit
e0287800f9
1 changed files with 12 additions and 4 deletions
|
|
@ -271,11 +271,19 @@ class IssuePage(NewIssuePage):
|
||||||
else:
|
else:
|
||||||
for li in details.findall('li'):
|
for li in details.findall('li'):
|
||||||
field = li.find('strong').text.decode('utf-8')
|
field = li.find('strong').text.decode('utf-8')
|
||||||
if len(li.findall('i')) == 2:
|
i = li.findall('i')
|
||||||
last = li.findall('i')[0].text.decode('utf-8')
|
new = None
|
||||||
|
last = None
|
||||||
|
if len(i) > 0:
|
||||||
|
if len(i) == 2:
|
||||||
|
last = i[0].text.decode('utf-8')
|
||||||
|
new = i[-1].text.decode('utf-8')
|
||||||
|
elif li.find('strike') is not None:
|
||||||
|
last = li.find('strike').find('i').text.decode('utf-8')
|
||||||
|
elif li.find('a') is not None:
|
||||||
|
new = li.find('a').text.decode('utf-8')
|
||||||
else:
|
else:
|
||||||
last = None
|
self.logger.warning('Unable to handle change for %s' % field)
|
||||||
new = li.findall('i')[-1].text.decode('utf-8')
|
|
||||||
changes.append((field, last, new))
|
changes.append((field, last, new))
|
||||||
update['changes'] = changes
|
update['changes'] = changes
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue