src/eric7/PluginManager/PluginManager.py

branch
eric7
changeset 10192
f457742dd3d6
parent 10124
834c76d6ab4d
child 10213
0d0683edaf24
equal deleted inserted replaced
10191:dc47d7d2ff34 10192:f457742dd3d6
1255 if period == 0 or (self.__ui is not None and not self.__ui.isOnline()): 1255 if period == 0 or (self.__ui is not None and not self.__ui.isOnline()):
1256 return 1256 return
1257 1257
1258 elif period in [1, 2, 3] and pathlib.Path(self.pluginRepositoryFile).exists(): 1258 elif period in [1, 2, 3] and pathlib.Path(self.pluginRepositoryFile).exists():
1259 lastModified = datetime.datetime.fromtimestamp( 1259 lastModified = datetime.datetime.fromtimestamp(
1260 pathlib.Path(self.pluginRepositoryFile).stat().st_mtime 1260 pathlib.Path(self.pluginRepositoryFile).stat().st_mtime,
1261 tz=datetime.timezone.utc,
1261 ) 1262 )
1262 now = datetime.datetime.now() 1263 now = datetime.datetime.now(tz=datetime.timezone.utc)
1263 delta = now - lastModified 1264 delta = now - lastModified
1264 if ( 1265 if (
1265 (period == 1 and delta.days < 1) 1266 (period == 1 and delta.days < 1)
1266 or (period == 2 and delta.days < 7) 1267 or (period == 2 and delta.days < 7)
1267 or (period == 3 and delta.days < 30) 1268 or (period == 3 and delta.days < 30)

eric ide

mercurial