Corrected code to update the install info file only, if the "eric7installpip.json" file is newer. eric7

Mon, 04 Jul 2022 17:21:56 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 04 Jul 2022 17:21:56 +0200
branch
eric7
changeset 9204
be84ff69f30e
parent 9203
b201a2ffe174
child 9205
b75da2ba2a1a

Corrected code to update the install info file only, if the "eric7installpip.json" file is newer.

eric7/UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/eric7/UI/UserInterface.py	Sun Jul 03 18:09:29 2022 +0200
+++ b/eric7/UI/UserInterface.py	Mon Jul 04 17:21:56 2022 +0200
@@ -1695,7 +1695,11 @@
             else:
                 filename = os.path.join(getConfig("ericDir"),
                                         "eric7installpip.json")
-                if os.path.exists(filename):
+                if (
+                    os.path.exists(filename) and
+                    os.path.getmtime(filename) >
+                    os.path.getmtime(installInfoFile)
+                ):
                     # eric was updated via pip (i.e. eric-ide)
                     # just update the installation date and time
                     installDateTime = datetime.datetime.now(tz=None)

eric ide

mercurial