From 124e72aeb833f8002cbaeb30cd88f3678595c330 Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 1 Feb 2013 10:49:17 +0100 Subject: [PATCH] Display validity date --- modules/nettokom/pages/homepage.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/nettokom/pages/homepage.py b/modules/nettokom/pages/homepage.py index 65a77f65..0a5f6105 100644 --- a/modules/nettokom/pages/homepage.py +++ b/modules/nettokom/pages/homepage.py @@ -36,14 +36,15 @@ class HomePage(BasePage): credit = divabo.xpath('dl/dd')[1].text expiredate = divabo.xpath('dl/dd')[2].text phoneplan = divabo.xpath('dl/dd')[3].text - self.browser.logger.debug('Found ' + owner + ' has subscriber') - self.browser.logger.debug('Found ' + phone + ' has phone number') - self.browser.logger.debug('Found ' + credit + ' has available credit') - self.browser.logger.debug('Found ' + expiredate + 'has expire date ') - self.browser.logger.debug('Found ' + phoneplan + ' has subscription type') + self.browser.logger.debug('Found ' + owner + ' as subscriber') + self.browser.logger.debug('Found ' + phone + ' as phone number') + self.browser.logger.debug('Found ' + credit + ' as available credit') + self.browser.logger.debug('Found ' + expiredate + ' as expire date ') + self.browser.logger.debug('Found %s as subscription type', phoneplan) subscription = Subscription(phone) - subscription.label = unicode(phone + u' - ' + credit + u' - ' + phoneplan) + subscription.label = unicode(u'%s - %s - %s - %s' % + (phone, credit, phoneplan, expiredate)) subscription.subscriber = unicode(owner) expiredate = date(*reversed([int(x) for x in expiredate.split(".")])) subscription.validity = expiredate