comparison backend/AbstractBackend.py @ 218:699d8f1cebd4

unify imports, especially Qt imports. Use consistent super syntax
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 27 Apr 2014 06:04:57 +0200
parents bb3c851b18b1
children f79be01821c4
comparison
equal deleted inserted replaced
217:bb3c851b18b1 218:699d8f1cebd4
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 from datetime import datetime, timedelta 2 from datetime import datetime, timedelta
3 3
4 def calculateExpireDate(preferences): 4 def calculateExpireDate(preferences):
5 now = datetime.now() 5 now = datetime.now()
6 daysToKeepFeedEntries = preferences.daysToKeepFeedEntries() 6 daysToKeepFeedEntries = preferences.daysToKeepFeedEntries()
7 delta = timedelta(days=daysToKeepFeedEntries) 7 delta = timedelta(days=daysToKeepFeedEntries)
8 return now - delta 8 return now - delta
9 9
10 class AbstractBackend(object): 10 class AbstractBackend(object):
11 def __init__(self): 11 def __init__(self):
12 self.feeds = [] 12 self.feeds = []
13 self.selectedFeed = None 13 self.selectedFeed = None