pep8 cleaning

This commit is contained in:
Florent 2013-01-08 21:03:19 +01:00
commit b8227b69b1
2 changed files with 4 additions and 9 deletions

View file

@ -48,7 +48,6 @@ class DetailsPage(BasePage):
virtualnumber = div.attrib['onclick'].split('(')[1][1]
self.details['num' + str(phonenumber)] = virtualnumber
for div in self.document.xpath('//div[@class="infosConso"]'):
num = div.attrib['id'].split('_')[1][0]
self.details[num] = []
@ -129,10 +128,10 @@ class DetailsPage(BasePage):
mydate = div.xpath('span[@class="actif"]')[0].text
mydate = date(*reversed([int(x) for x in mydate.split("/")]))
if mydate.month == 12:
mydate = mydate.replace(month = 1)
mydate = mydate.replace(year= mydate.year + 1)
mydate = mydate.replace(month=1)
mydate = mydate.replace(year=mydate.year + 1)
else:
mydate = mydate.replace(month = mydate.month + 1)
mydate = mydate.replace(month=mydate.month + 1)
return mydate
@ -146,7 +145,7 @@ class HistoryPage(BasePage):
self.calls = []
for tr in self.document.xpath('//tr'):
tds = tr.xpath('td')
if tds[0].text == None or tds[0].text == "Date":
if tds[0].text is None or tds[0].text == "Date":
pass
else:
detail = Detail()