1253 elif period in [1, 2, 3]: |
1253 elif period in [1, 2, 3]: |
1254 lastModified = QFileInfo(self.pluginRepositoryFile).lastModified() |
1254 lastModified = QFileInfo(self.pluginRepositoryFile).lastModified() |
1255 if lastModified.isValid() and lastModified.date().isValid(): |
1255 if lastModified.isValid() and lastModified.date().isValid(): |
1256 lastModifiedDate = lastModified.date() |
1256 lastModifiedDate = lastModified.date() |
1257 now = QDate.currentDate() |
1257 now = QDate.currentDate() |
1258 if period == 1 and lastModifiedDate.day() == now.day(): |
1258 if ( |
1259 # daily |
1259 (period == 1 and lastModifiedDate.day() == now.day()) or |
1260 return |
1260 (period == 2 and lastModifiedDate.daysTo(now) < 7) or |
1261 elif period == 2 and lastModifiedDate.daysTo(now) < 7: |
1261 (period == 3 and (lastModifiedDate.daysTo(now) < |
1262 # weekly |
1262 lastModifiedDate.daysInMonth())) |
1263 return |
|
1264 elif ( |
|
1265 period == 3 and |
|
1266 (lastModifiedDate.daysTo(now) < |
|
1267 lastModifiedDate.daysInMonth()) |
|
1268 ): |
1263 ): |
1269 # monthly |
1264 # daily, weekly, monthly |
1270 return |
1265 return |
1271 |
1266 |
1272 self.__updateAvailable = False |
1267 self.__updateAvailable = False |
1273 |
1268 |
1274 request = QNetworkRequest( |
1269 request = QNetworkRequest( |